Skip to content

ArcTo does not seems correctly supported for Path Data #2228

Closed

Description

@agneszitte

Current behavior

Try to use this Path in an Uno Solution

<Path Data="m 822.6875,43.4375 a 1.375,1.3125 0 0 1 -1.375,1.3125 1.375,1.3125 0 0 1 -1.375,-1.3125 1.375,1.3125 0 0 1 1.375,-1.3125 1.375,1.3125 0 0 1 1.375,1.3125 z"
Fill="Red" />

System.Exception: 'Failed to load Page'
(at Uno.Media.PathStreamGeometryContext.ArcTo (Windows.Foundation.Point point, Windows.Foundation.Size size, System.Double rotationAngle, System.Boolean isLargeArc, Windows.UI.Xaml.Media.SweepDirection sweepDirection, System.Boolean isStroked, System.Boolean isSmoothJoin) [0x00010] in D:\a\1\s\src\Uno.UI\Media\PathStreamGeometryContext.cs:91)

Expected behavior

The solution should run correctly without an exception.

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

Using this Path Control :
<Path Data="m 822.6875,43.4375 a 1.375,1.3125 0 0 1 -1.375,1.3125 1.375,1.3125 0 0 1 -1.375,-1.3125 1.375,1.3125 0 0 1 1.375,-1.3125 1.375,1.3125 0 0 1 1.375,1.3125 z" Fill="Red" />

Environment

Nuget Package: 2.1.0-dev.18

  • iOS
  • Android
  • WebAssembly
  • WebAssembly renderers for Xamarin.Forms
  • Windows
  • Build tasks
  • Solution Templates

Visual Studio:

  • 2017 (version: )
  • 2019 (version: 16.3.10)
  • for Mac (version: )

Activity

  1. added
    kind/bug
    triage/untriaged
    on Nov 29, 2019
  2. removed
    triage/untriaged
    on Aug 29, 2020
  3. modified the milestone: 3.1 on Aug 29, 2020
  4. added
    project/shapes-brushes 🔶
    on Sep 21, 2020
  5. vkotov commented on Nov 6, 2020

    @vkotov

    Unable to create Path with Arc on Android (not tested on iOS) like this: https://docs.microsoft.com/en-us/dotnet/desktop/wpf/graphics-multimedia/how-to-create-an-elliptical-arc?view=netframeworkdesktop-4.8

    Getting error
    System.NotImplementedException: The arc must be based on a circle, not an ellipse.

    at Uno.Media.PathStreamGeometryContext.ArcTo (Windows.Foundation.Point point, Windows.Foundation.Size size, System.Double rotationAngle, System.Boolean isLargeArc, Windows.UI.Xaml.Media.SweepDirection sweepDirection, System.Boolean isStroked, System.Boolean isSmoothJoin) [0x00010] in C:\a\1\s\src\Uno.UI\Media\PathStreamGeometryContext.cs:115
    at Windows.UI.Xaml.Media.GeometryHelper.Write (Uno.Media.StreamGeometryContext ctx, Windows.UI.Xaml.Media.PathSegment pathSegment) [0x00053] in C:\a\1\s\src\Uno.UI\UI\Xaml\Media\GeometryHelper.cs:76
    at Uno.Extensions.EnumerableExtensions.ForEach[T] (System.Collections.Generic.IEnumerable1[T] items, System.Action1[T] action) [0x00013] in D:\a\1\s\src\Uno.Core\Collections\EnumerableExtensions.cs:77
    at Windows.UI.Xaml.Media.GeometryHelper.Write (Uno.Media.StreamGeometryContext ctx, Windows.UI.Xaml.Media.PathFigure pathFigure) [0x00018] in C:\a\1\s\src\Uno.UI\UI\Xaml\Media\GeometryHelper.cs:67
    at Uno.Extensions.EnumerableExtensions.ForEach[T] (System.Collections.Generic.IEnumerable1[T] items, System.Action1[T] action) [0x00013] in D:\a\1\s\src\Uno.Core\Collections\EnumerableExtensions.cs:77
    at Windows.UI.Xaml.Media.GeometryHelper.Write (Uno.Media.StreamGeometryContext ctx, Windows.UI.Xaml.Media.PathGeometry pathGeometry) [0x00000] in C:\a\1\s\src\Uno.UI\UI\Xaml\Media\GeometryHelper.cs:61
    at Windows.UI.Xaml.Media.GeometryHelper.Write (Uno.Media.StreamGeometryContext ctx, Windows.UI.Xaml.Media.Geometry geometry) [0x0001d] in C:\a\1\s\src\Uno.UI\UI\Xaml\Media\GeometryHelper.cs:47
    at Windows.UI.Xaml.Media.GeometryHelper.ToStreamGeometry (Windows.UI.Xaml.Media.Geometry geometry) [0x00047] in C:\a\1\s\src\Uno.UI\UI\Xaml\Media\GeometryHelper.cs:32
    at Windows.UI.Xaml.Shapes.Path.GetPath (Windows.Foundation.Size availableSize) [0x00000] in C:\a\1\s\src\Uno.UI\UI\Xaml\Shapes\Path.Android.cs:10
    at Windows.UI.Xaml.Shapes.ArbitraryShapeBase.BuildDrawableLayer () [0x00054] in C:\a\1\s\src\Uno.UI\UI\Xaml\Shapes\ArbitraryShapeBase.Android.cs:62
    at Windows.UI.Xaml.Shapes.ArbitraryShapeBase.RefreshShape (System.Boolean forceRefresh) [0x0003f] in C:\a\1\s\src\Uno.UI\UI\Xaml\Shapes\ArbitraryShapeBase.cs:70
    at Windows.UI.Xaml.Shapes.ArbitraryShapeBase.OnLayoutCore (System.Boolean changed, System.Int32 left, System.Int32 top, System.Int32 right, System.Int32 bottom) [0x00016] in C:\a\1\s\src\Uno.UI\UI\Xaml\Shapes\ArbitraryShapeBase.Android.cs:205
    at Uno.UI.UnoViewGroup.n_OnLayoutCore_ZIIII (System.IntPtr jnienv, System.IntPtr native__this, System.Boolean p0, System.Int32 p1, System.Int32 p2, System.Int32 p3, System.Int32 p4) [0x00009] in C:\a\1\s\src\Uno.UI.BindingHelper.Android\obj\Release\MonoAndroid10.0\generated\src\Uno.UI.UnoViewGroup.cs:517
    at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.93(intptr,intptr,bool,int,int,int,int)

    Skia work fine but with some differences on pixel level.

  6. added
    difficulty/tbd
    on Feb 15, 2021
  7. added
    difficulty/medium 🤔
    and removed
    difficulty/tbd
    on Jun 1, 2021
  8. changed the title [-][iOS/Android] ArcTo does not seems correctly supported for Path Data[/-] [+][iOS/Android] `ArcTo` does not seems correctly supported for Path Data[/+] on Jun 12, 2023
  9. MartinZikmund commented on Jul 17, 2025

    @MartinZikmund
    Member

    This still applies to Skia targets as well.

    Should be a relatively easy fix

  10. changed the title [-][iOS/Android] `ArcTo` does not seems correctly supported for Path Data[/-] [+]`ArcTo` does not seems correctly supported for Path Data[/+] on Jul 17, 2025
  11. added theissue type on Jul 17, 2025
  12. MartinZikmund commented on Apr 7, 2026

    @MartinZikmund
    Member

    Repro generator

    Runtime test(s) added in branch dev/mazi/repro/2228:

    • src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Shapes/Given_Path.cs → When_Path_ArcTo_Multiple_Arcs_Does_Not_Throw

    ⚠️ The test(s) pass on current master (Skia Desktop) — ArcSegment with non-uniform radii (Size='1.375,1.3125') loads and renders without exception. The original exception at PathStreamGeometryContext.ArcTo was reported on iOS and Android — it may have been fixed for those platforms too, or the fix may be specific to Skia. The branch serves as a regression guard.

  13. self-assigned this
    on Apr 23, 2026
  14. MartinZikmund commented on Apr 29, 2026

    @MartinZikmund
    Member

    @Xiaoy312 I made a larger issue that covers this too, if you haven't started on it, the fix will be included in that larger branch so it is not necessary to pick this one up anymore

  15. added 3 commits that reference this issue on May 4, 2026
    2c09273
    c71458c
    35d8685
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

difficulty/medium 🤔has-repro-branchkind/bugproject/shapes-brushes 🔶renderer/skia

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions