Browse Source
Fix CustomDrawingExampleControl crash on Direct2D
pull/10295/head
Julien Lebosquain
4 years ago
No known key found for this signature in database
GPG Key ID: 1833CAD10ACC46FD
1 changed files with
6 additions and
4 deletions
-
samples/ControlCatalog/Pages/CustomDrawingExampleControl.cs
|
|
|
@ -59,10 +59,12 @@ namespace ControlCatalog.Pages |
|
|
|
|
|
|
|
}; |
|
|
|
StreamGeometry sg = new StreamGeometry(); |
|
|
|
var cntx = sg.Open(); |
|
|
|
cntx.BeginFigure(new Point(-25.0d, -10.0d), false); |
|
|
|
cntx.ArcTo(new Point(25.0d, -10.0d), new Size(10.0d, 10.0d), 0.0d, false, SweepDirection.Clockwise); |
|
|
|
cntx.EndFigure(true); |
|
|
|
using (var cntx = sg.Open()) |
|
|
|
{ |
|
|
|
cntx.BeginFigure(new Point(-25.0d, -10.0d), false); |
|
|
|
cntx.ArcTo(new Point(25.0d, -10.0d), new Size(10.0d, 10.0d), 0.0d, false, SweepDirection.Clockwise); |
|
|
|
cntx.EndFigure(true); |
|
|
|
} |
|
|
|
_smileGeometry = sg.Clone(); |
|
|
|
} |
|
|
|
|
|
|
|
|