/// <summary>
        /// Draws an ellipse.
        /// </summary>
        /// <param name="rect">The rectangle.</param>
        /// <param name="fill">The fill color.</param>
        /// <param name="stroke">The stroke color.</param>
        /// <param name="thickness">The thickness.</param>
        public override void DrawEllipse(OxyRect rect, OxyColor fill, OxyColor stroke, double thickness)
        {
            this.SetAlias(false);
            var convertedRectangle = rect.Convert();
            if (fill.IsVisible())
            {
                this.SetFill(fill);
                using (var path = new CGPath())
                {
                    path.AddEllipseInRect(convertedRectangle);
                    this.gctx.AddPath(path);
                }

                this.gctx.DrawPath(CGPathDrawingMode.Fill);
            }

            if (stroke.IsVisible() && thickness > 0)
            {
                this.SetStroke(stroke, thickness);

                using (var path = new CGPath())
                {
                    path.AddEllipseInRect(convertedRectangle);
                    this.gctx.AddPath(path);
                }

                this.gctx.DrawPath(CGPathDrawingMode.Stroke);
            }
        }
 /// <summary>
 /// Sets the clip rectangle.
 /// </summary>
 /// <param name="rect">The clip rectangle.</param>
 /// <returns>True if the clip rectangle was set.</returns>
 public override bool SetClip(OxyRect rect)
 {
     this.gctx.SaveState();
     this.gctx.ClipToRect(rect.Convert());
     return(true);
 }
 /// <summary>
 /// Sets the clip rectangle.
 /// </summary>
 /// <param name="rect">The clip rectangle.</param>
 /// <returns>True if the clip rectangle was set.</returns>
 public override bool SetClip(OxyRect rect)
 {
     this.gctx.SaveState ();
     this.gctx.ClipToRect (rect.Convert ());
     return true;
 }