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

StrokeDashArray does not behave the same on all platforms #16686

Open
agneszitte opened this issue May 11, 2024 · 2 comments
Open

StrokeDashArray does not behave the same on all platforms #16686

agneszitte opened this issue May 11, 2024 · 2 comments
Labels
difficulty/medium 🤔 Categorizes an issue for which the difficulty level is reachable with a good understanding of WinUI kind/bug Something isn't working project/shapes-brushes 🔶 Categorizes an issue or PR as relevant to shapes and brushes

Comments

@agneszitte
Copy link
Contributor

agneszitte commented May 11, 2024

Current behavior

StrokeDashArray does not behave the same on all platforms

  • Windows
    image
  • WASM
    image
  • Desktop
    image
  • Android
    image
  • iOS
    image

Expected behavior

StrokeDashArray should behave the same on all platforms

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

  • Launch the sample app: TestStrokeDashArray.zip
  • Notice the differences between platforms, none are correctly matching Windows
  • Pay attention to the distances between the dashes compare to Windows

Related XAML markup:

<StackPanel Orientation="Vertical" Spacing="10" Margin="10">
    <Rectangle Width="100" Height="100"  Stroke="Red"  StrokeThickness="3" />
    <Rectangle  
        IsHitTestVisible="False" 
        Width="100"
        Height="100"
        Stroke="Red"
        StrokeThickness="2" 
        StrokeDashArray="2,2" />
</StackPanel>

Workaround

N/A

Works on UWP/WinUI

Yes

Environment

Uno.UI / Uno.UI.WebAssembly / Uno.UI.Skia

NuGet package version(s)

"Uno.Sdk": "5.2.112"

Affected platforms

WebAssembly, Android, iOS, Mac Catalyst, Skia (WPF), Skia (Linux X11), Skia (macOS), Skia (Linux Framebuffer), Skia (GTK)

IDE

Visual Studio 2022

IDE version

17.9.6

@agneszitte agneszitte added kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. labels May 11, 2024
@Youssef1313 Youssef1313 self-assigned this May 11, 2024
@Youssef1313
Copy link
Member

Youssef1313 commented May 11, 2024

For Skia:

// TODO: Add support for dashes here
// strokePaint.PathEffect = SKPathEffect.CreateDash();

@agneszitte
Copy link
Contributor Author

cc @MartinZikmund

@MartinZikmund MartinZikmund added project/shapes-brushes 🔶 Categorizes an issue or PR as relevant to shapes and brushes difficulty/medium 🤔 Categorizes an issue for which the difficulty level is reachable with a good understanding of WinUI and removed triage/untriaged Indicates an issue requires triaging or verification difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. labels May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty/medium 🤔 Categorizes an issue for which the difficulty level is reachable with a good understanding of WinUI kind/bug Something isn't working project/shapes-brushes 🔶 Categorizes an issue or PR as relevant to shapes and brushes
Projects
None yet
Development

No branches or pull requests

3 participants