Skip to content

Commit 980da23

Browse files
committed
updated demo and version
1 parent c2b6aea commit 980da23

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

Source/DXControl/D2Phap.DXControl.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<IncludeSymbols>True</IncludeSymbols>
2222
<PackageReleaseNotes>See release notes here: https://github.com/d2phap/DXControl/releases</PackageReleaseNotes>
2323
<Authors>Duong Dieu Phap</Authors>
24-
<VersionPrefix>2.1.0</VersionPrefix>
24+
<VersionPrefix>2.2.0</VersionPrefix>
2525
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
2626
<PublishRepositoryUrl>true</PublishRepositoryUrl>
2727
<EmbedUntrackedSources>true</EmbedUntrackedSources>

Source/Demo/DXCanvas.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ public WicBitmapSource? Image
5555
public DXCanvas()
5656
{
5757
CheckFPS = true;
58+
//EnableAnimation = false;
5859
}
5960

6061

@@ -111,6 +112,15 @@ protected override void OnRender(IGraphics g)
111112
g.DrawEllipse(200, 200, 300, 200, Color.FromArgb(120, Color.Magenta), Color.Purple, 5);
112113

113114

115+
using var geo = g.GetCombinedRectanglesGeometry(new RectangleF(200, 300, 300, 300),
116+
new Rectangle(250, 250, 300, 100), 0, 0, CombineMode.Intesect);
117+
g.DrawGeometry(geo, Color.Transparent, Color.Yellow, 2);
118+
119+
120+
using var geo2 = g.GetCombinedEllipsesGeometry(new Rectangle(450, 450, 300, 100), new RectangleF(400, 400, 300, 300), CombineMode.Exclude);
121+
g.DrawGeometry(geo2, Color.Transparent, Color.Green, 2f);
122+
123+
114124
var engine = UseHardwareAcceleration ? "GPU" : "GDI+";
115125
g.DrawText($"FPS: {FPS} - {engine}", Font.Name, 15, 0, 0, Color.Purple, DeviceDpi);
116126

0 commit comments

Comments
 (0)