File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -850,19 +850,24 @@ public void Render(RenderContext context)
850850 context . Transform = Transform ;
851851
852852 Rectangle ? oldScissorRectangle = null ;
853- if ( ClipToBounds && context . Transform . Rotation == 0 )
853+ if ( context . Transform . Rotation . IsZero ( ) )
854854 {
855- oldScissorRectangle = context . Scissor ;
856855 var absoluteBounds = context . Transform . Apply ( Bounds ) ;
857- var newScissorRectangle = Rectangle . Intersect ( context . Scissor , absoluteBounds ) ;
856+ var scissorBounds = Rectangle . Intersect ( context . Scissor , absoluteBounds ) ;
858857
859- if ( newScissorRectangle . Width == 0 || newScissorRectangle . Height == 0 )
858+ if ( scissorBounds . Width == 0 || scissorBounds . Height == 0 )
860859 {
860+ // Culled by scissor
861861 context . Transform = oldTransform ;
862862 return ;
863863 }
864864
865- context . Scissor = newScissorRectangle ;
865+ if ( ClipToBounds )
866+ {
867+ oldScissorRectangle = context . Scissor ;
868+
869+ context . Scissor = scissorBounds ;
870+ }
866871 }
867872
868873 var oldOpacity = context . Opacity ;
@@ -1431,7 +1436,7 @@ public Widget Clone()
14311436 result . CopyFrom ( this ) ;
14321437
14331438 // Copy attached properties
1434- foreach ( var pair in AttachedPropertiesValues )
1439+ foreach ( var pair in AttachedPropertiesValues )
14351440 {
14361441 result . AttachedPropertiesValues [ pair . Key ] = pair . Value ;
14371442 }
You can’t perform that action at this time.
0 commit comments