Example #1
0
 public void DrawEllipse(OxyRect rect, OxyColor fill, OxyColor stroke, double thickness = 1)
 {
     using (var paint = new Paint())
     {
         paint.AntiAlias   = true;
         paint.StrokeWidth = (float)thickness;
         if (fill != null)
         {
             paint.SetStyle(Paint.Style.Fill);
             paint.Color = stroke.ToColor();
             canvas.DrawOval(rect.ToRectF(), paint);
         }
         if (stroke != null)
         {
             paint.SetStyle(Paint.Style.Stroke);
             paint.Color = stroke.ToColor();
             canvas.DrawOval(rect.ToRectF(), paint);
         }
     }
 }
 public void DrawEllipse(OxyRect rect, OxyColor fill, OxyColor stroke, double thickness = 1)
 {
     using (var paint = new Paint())
     {
         paint.AntiAlias = true;
         paint.StrokeWidth = (float)thickness;
         if (fill != null)
         {
             paint.SetStyle(Paint.Style.Fill);
             paint.Color = stroke.ToColor();
             canvas.DrawOval(rect.ToRectF(), paint);
         }
         if (stroke != null)
         {
             paint.SetStyle(Paint.Style.Stroke);
             paint.Color = stroke.ToColor();
             canvas.DrawOval(rect.ToRectF(), paint);
         }
     }
 }