From 5048ebbcf8822293cbc1038ac077c00d3bd0fca4 Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Wed, 17 Dec 2014 04:13:25 +0100 Subject: [PATCH] Fix the clip/rotation problem. --- Windows/Perspex.Direct2D1/Renderer.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Windows/Perspex.Direct2D1/Renderer.cs b/Windows/Perspex.Direct2D1/Renderer.cs index f6240e934f..fdf5e2dfdd 100644 --- a/Windows/Perspex.Direct2D1/Renderer.cs +++ b/Windows/Perspex.Direct2D1/Renderer.cs @@ -149,13 +149,13 @@ namespace Perspex.Direct2D1 } // Draw the control and its children. - Matrix m = transform * translation; - using (visual.ClipToBounds ? context.PushClip(visual.Bounds * m) : null) + var m = transform * translation; + var d = context.PushTransform(m); + + using (visual.ClipToBounds ? context.PushClip(visual.Bounds) : null) { - using (context.PushTransform(m)) - { - visual.Render(context); - } + visual.Render(context); + d.Dispose(); foreach (var child in visual.VisualChildren) {