From ef28479b935af0897c618ecb308928874f5db2af Mon Sep 17 00:00:00 2001 From: Jason Jarvis Date: Sun, 8 May 2016 15:21:12 -0700 Subject: [PATCH] Use DrawRoundRect on Skia now that SkiaSharp provides it. --- src/Skia/Perspex.Skia/DrawingContextImpl.cs | 10 ++-------- src/Skia/Perspex.Skia/readme.md | 1 - 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/Skia/Perspex.Skia/DrawingContextImpl.cs b/src/Skia/Perspex.Skia/DrawingContextImpl.cs index 49d627442b..970ecfbb2f 100644 --- a/src/Skia/Perspex.Skia/DrawingContextImpl.cs +++ b/src/Skia/Perspex.Skia/DrawingContextImpl.cs @@ -229,10 +229,7 @@ namespace Perspex.Skia } else { - // TODO: DrawRRect (ore DrawRoundedRect) is not accesible in SkiaSharp yet. We should add that - // to SkiaSharp and initiate a PR.... - Canvas.DrawRect(rc, paint.Paint); - //Canvas.DrawRoundedRect(rc, cornerRadius, cornerRadius, paint); + Canvas.DrawRoundRect(rc, cornerRadius, cornerRadius, paint.Paint); } } } @@ -248,10 +245,7 @@ namespace Perspex.Skia } else { - // TODO: this does not exist in SkiaSharp yet - //throw new NotImplementedException(); - //Canvas.DrawRoundedRect(rc, cornerRadius, cornerRadius, paint); - Canvas.DrawRect(rc, paint.Paint); + Canvas.DrawRoundRect(rc, cornerRadius, cornerRadius, paint.Paint); } } } diff --git a/src/Skia/Perspex.Skia/readme.md b/src/Skia/Perspex.Skia/readme.md index 1c923df3c5..615564b17f 100644 --- a/src/Skia/Perspex.Skia/readme.md +++ b/src/Skia/Perspex.Skia/readme.md @@ -5,7 +5,6 @@ BitmapImpl - Save DrawingContextImpl -- DrawRoundRect is not properly implemented due to lack of support in SkiaSharp - Alpha support missing as SkiaSharp does not expose this - Gradient Shader caching? - TileBrushes