Skip to content

Commit

Permalink
Merge pull request #18787 from ramezgerges/wasm_image_clipping
Browse files Browse the repository at this point in the history
fix(image): clipping images on WASM was not working
  • Loading branch information
ramezgerges authored Nov 14, 2024
2 parents c50901c + f4ade32 commit e17cd40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Uno.UI/UI/Xaml/Controls/Image/Image.wasm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ protected override Size ArrangeOverride(Size finalSize)
// Calculate the position of the image to follow stretch and alignment requirements
var finalPosition = this.ArrangeSource(finalSize, containerSize);

_htmlImage.ArrangeVisual(finalPosition, clipRect: null);
_htmlImage.ArrangeVisual(finalPosition, clipRect: new Rect(new Point(-finalPosition.Left, -finalPosition.Top), finalSize));

if (this.Log().IsEnabled(LogLevel.Debug))
{
Expand Down

0 comments on commit e17cd40

Please sign in to comment.