Skip to content

[WASM] RenderTransform not working as expected #9353

Closed

Description

@notofug

Current behavior

When creating a Path with a Geometry where Bounds are negative and using RenderTransform to shift the element into View the result is not displayed correctly ;

image

Expected behavior

No response

How to reproduce it (as minimally and precisely as possible)

static UIElement create_test() // demonstrate error with wasm-transformation
{
	var canvas = new Canvas();

	var element = new Microsoft.UI.Xaml.Shapes.Rectangle() { Height = 200, Width = 200 };
	element.Fill = new SolidColorBrush(Windows.UI.Color.FromArgb(0xff, 0xff, 0xff, 0xe0));

	canvas.Children.Add(element);

	var path = new Microsoft.UI.Xaml.Shapes.Path();
	path.Fill = new SolidColorBrush(Windows.UI.Color.FromArgb(0xff, 0x90, 0xee, 0x90));
	path.Data = new EllipseGeometry
	{
		Center = new Windows.Foundation.Point { X = 0, Y = 0 },
		RadiusX = 100,
		RadiusY = 100
	};

	path.RenderTransform = new MatrixTransform() { Matrix = new Matrix(1, 0, 0, -1, 100, 100) };

	canvas.Children.Add(path);

	return canvas;
}

Workaround

No response

Works on UWP/WinUI

Yes

Environment

Uno.WinUI / Uno.WinUI.WebAssembly / Uno.WinUI.Skia

NuGet package version(s)

<PackageReference Include="Uno.WinUI.WebAssembly" Version="4.4.13" />

Affected platforms

WebAssembly

IDE

Visual Studio 2022

IDE version

No response

Relevant plugins

No response

Anything else we need to know?

No response

Activity

  1. added
    difficulty/tbd
    kind/bug
    triage/untriaged
    on Jul 25, 2022
  2. added
    project/shapes-brushes 🔶
    and removed
    triage/untriaged
    on Aug 1, 2022
  3. changed the title [-]Wasm RenderTransform not working as expected[/-] [+][WASM] `RenderTransform` not working as expected[/+] on Aug 14, 2023
  4. added
    difficulty/starter 🚀
    and removed
    difficulty/tbd
    on Aug 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    difficulty/starter 🚀kind/bugproject/shapes-brushes 🔶

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions