public override void DrawRect(CoreGraphics.CGRect dirtyRect)
        {
            var c = new CGContextCanvas(NSGraphicsContext.CurrentContext.CGContext);

            if (GraphicView != null)
            {
                GraphicView.Draw(c, Conversions.GetRect(dirtyRect));
            }
        }
예제 #2
0
        /// <summary>
        /// Draw the specified rect.
        /// </summary>
        /// <param name="rect">Rect.</param>
        public override void Draw(CoreGraphics.CGRect rect)
        {
            base.Draw(rect);

            using (CGContext context = UIGraphics.GetCurrentContext())
            {
                context.SetAllowsAntialiasing(true);
                context.SetShouldAntialias(true);
                context.SetShouldSmoothFonts(true);

                var canvas = new CGContextCanvas(context);
                Element.Draw(canvas, new NGraphics.Rect(rect.Left, rect.Top, rect.Width, rect.Height));
            }
        }