Browse Source
extend DrawingContext.cs to accept IGeometryImpl in DrawGeometry method
pull/5683/head
Jumar Macato
6 years ago
No known key found for this signature in database
GPG Key ID: B19884DAC3A5BF3F
1 changed files with
12 additions and
1 deletions
-
src/Avalonia.Visuals/Media/DrawingContext.cs
|
|
|
@ -121,12 +121,23 @@ namespace Avalonia.Media |
|
|
|
/// <param name="pen">The stroke pen.</param>
|
|
|
|
/// <param name="geometry">The geometry.</param>
|
|
|
|
public void DrawGeometry(IBrush brush, IPen pen, Geometry geometry) |
|
|
|
{ |
|
|
|
DrawGeometry(brush, pen, geometry.PlatformImpl); |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Draws a geometry.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="brush">The fill brush.</param>
|
|
|
|
/// <param name="pen">The stroke pen.</param>
|
|
|
|
/// <param name="geometry">The geometry.</param>
|
|
|
|
public void DrawGeometry(IBrush brush, IPen pen, IGeometryImpl geometry) |
|
|
|
{ |
|
|
|
Contract.Requires<ArgumentNullException>(geometry != null); |
|
|
|
|
|
|
|
if (brush != null || PenIsVisible(pen)) |
|
|
|
{ |
|
|
|
PlatformImpl.DrawGeometry(brush, pen, geometry.PlatformImpl); |
|
|
|
PlatformImpl.DrawGeometry(brush, pen, geometry); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|