Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SkiaSharp3 is scaling Path of different size than v2 #33

Open
taublast opened this issue Mar 27, 2024 · 0 comments
Open

SkiaSharp3 is scaling Path of different size than v2 #33

taublast opened this issue Mar 27, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@taublast
Copy link
Owner

taublast commented Mar 27, 2024

When using SkiaShape Path, the MAUI alternative, the ski3 preview is rendering them with a smaller size..

  <draw:SkiaShape
      PathData="M0,0L15.825011,8.0009766 31.650999,15.997986 15.825011,23.998993 0,32 0,15.997986z"
      HeightRequest="16"
      LockRatio="1"
      BackgroundColor="Black"
      HorizontalOptions="Center"
      VerticalOptions="Center"
      Type="Path" />

v2
image

v3
image

The rendering uses the following shiasharp API:

SKPath path = SKPath.ParseSvgPathData(this.PathData);

then

path.GetTightBounds(out var bounds);

and then we just draw the path, that code works same for SVG and other cases no problem. So as I see it it's either ParseSvgPathData either (the most probable case) GetTightBounds that work differently between v2 and v3.

@taublast taublast added the bug Something isn't working label Mar 27, 2024
@taublast taublast self-assigned this Mar 27, 2024
@taublast taublast changed the title SkiaSharp3 preview is scaling Path smaller then stable version 2 SkiaSharp3 is scaling Path smaller than v2 Oct 31, 2024
@taublast taublast changed the title SkiaSharp3 is scaling Path smaller than v2 SkiaSharp3 is scaling Path of different size than v2 Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant