-
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 CompositionLineGeometry implementation
- Loading branch information
1 parent
3c5bc14
commit fe75691
Showing
3 changed files
with
43 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 CompositionLineGeometry : CompositionGeometry | ||
{ | ||
private Vector2 _start; | ||
private Vector2 _end; | ||
|
||
internal CompositionLineGeometry(Compositor compositor) : base(compositor) | ||
{ | ||
|
||
} | ||
|
||
public Vector2 Start | ||
{ | ||
get => _start; | ||
set => SetProperty(ref _start, value); | ||
} | ||
|
||
public Vector2 End | ||
{ | ||
get => _end; | ||
set => SetProperty(ref _end, value); | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
src/Uno.UWP/UI/Composition/CompositionLineGeometry.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,11 @@ | ||
#nullable enable | ||
|
||
using Windows.Graphics; | ||
|
||
namespace Windows.UI.Composition | ||
{ | ||
public partial class CompositionLineGeometry : CompositionGeometry | ||
{ | ||
internal override IGeometrySource2D? BuildGeometry() => new SkiaGeometrySource2D(BuildLineGeometry(Start, End)); | ||
} | ||
} |