Skip to content

Commit

Permalink
chore: make CornerRadius.GetRadii skia-only
Browse files Browse the repository at this point in the history
  • Loading branch information
ramezgerges committed May 4, 2024
1 parent 339796c commit 4215061
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Uno.UI.Composition/Composition/Uno/CornerRadius.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using System.Numerics;
using Windows.Foundation;
using SkiaSharp;
namespace Uno.UI.Composition;

// A close copy from MUX.CornerRadius
Expand All @@ -21,13 +20,15 @@ Vector2 BottomLeft
BottomRight == Vector2.Zero &&
BottomLeft == Vector2.Zero;

unsafe internal void GetRadii(SKPoint* radiiStore)
#if __SKIA__
unsafe internal void GetRadii(SkiaSharp.SKPoint* radiiStore)
{
*(radiiStore++) = new(TopLeft.X, TopLeft.Y);
*(radiiStore++) = new(TopRight.X, TopRight.Y);
*(radiiStore++) = new(BottomRight.X, BottomRight.Y);
*radiiStore = new(BottomLeft.X, BottomLeft.Y);
}
#endif
}

internal readonly record struct FullCornerRadius
Expand Down

0 comments on commit 4215061

Please sign in to comment.