-
Notifications
You must be signed in to change notification settings - Fork 742
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Added CompositionEllipseGeometry implementation
- Loading branch information
1 parent
fe75691
commit 10f2466
Showing
3 changed files
with
44 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#nullable enable | ||
|
||
using System.Numerics; | ||
|
||
namespace Windows.UI.Composition | ||
{ | ||
public partial class CompositionEllipseGeometry : CompositionGeometry | ||
{ | ||
private Vector2 _radius; | ||
private Vector2 _center; | ||
|
||
internal CompositionEllipseGeometry(Compositor compositor) : base(compositor) | ||
{ | ||
|
||
} | ||
|
||
public Vector2 Radius | ||
{ | ||
get => _radius; | ||
set => SetProperty(ref _radius, value); | ||
} | ||
|
||
public Vector2 Center | ||
{ | ||
get => _center; | ||
set => SetProperty(ref _center, value); | ||
} | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
src/Uno.UWP/UI/Composition/CompositionEllipseGeometry.skia.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#nullable enable | ||
|
||
using Windows.Graphics; | ||
|
||
namespace Windows.UI.Composition | ||
{ | ||
public partial class CompositionEllipseGeometry : CompositionGeometry | ||
{ | ||
internal override IGeometrySource2D? BuildGeometry() | ||
=> new SkiaGeometrySource2D(BuildEllipseGeometry(Center, Radius)); | ||
} | ||
} |