|
|
@ -182,11 +182,24 @@ namespace Avalonia.Rendering.Composition.Server |
|
|
|
|
|
|
|
|
if (_clipSizeDirty || positionChanged) |
|
|
if (_clipSizeDirty || positionChanged) |
|
|
{ |
|
|
{ |
|
|
_transformedClipBounds = ClipToBounds |
|
|
Rect? transformedVisualBounds = null; |
|
|
? new Rect(new Size(Size.X, Size.Y)) |
|
|
Rect? transformedClipBounds = null; |
|
|
.TransformToAABB(GlobalTransformMatrix) |
|
|
|
|
|
: null; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (ClipToBounds) |
|
|
|
|
|
transformedVisualBounds = new Rect(new Size(Size.X, Size.Y)).TransformToAABB(GlobalTransformMatrix); |
|
|
|
|
|
|
|
|
|
|
|
if (Clip != null) |
|
|
|
|
|
transformedClipBounds = Clip.Bounds.TransformToAABB(GlobalTransformMatrix); |
|
|
|
|
|
|
|
|
|
|
|
if (transformedVisualBounds != null && transformedClipBounds != null) |
|
|
|
|
|
_transformedClipBounds = transformedVisualBounds.Value.Intersect(transformedClipBounds.Value); |
|
|
|
|
|
else if (transformedVisualBounds != null) |
|
|
|
|
|
_transformedClipBounds = transformedVisualBounds; |
|
|
|
|
|
else if (transformedClipBounds != null) |
|
|
|
|
|
_transformedClipBounds = transformedClipBounds; |
|
|
|
|
|
else |
|
|
|
|
|
_transformedClipBounds = null; |
|
|
|
|
|
|
|
|
_clipSizeDirty = false; |
|
|
_clipSizeDirty = false; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|