Esempio n. 1
0
        public void DrawEllipse(Rect frame, Pen pen = null, Brush brush = null)
        {
            if (pen == null && brush == null)
            {
                return;
            }

            DrawElement(() => {
                context.AddEllipseInRect(Conversions.GetCGRect(frame));
                return(frame);
            }, pen, brush);
        }
Esempio n. 2
0
        public void DrawRectangle(Rect frame, Size corner, Pen pen = null, Brush brush = null)
        {
            if (pen == null && brush == null)
            {
                return;
            }

            DrawElement(() => {
                if (corner.Width > 0 || corner.Height > 0)
                {
                    AddRoundedRect(Conversions.GetCGRect(frame), Conversions.GetCGSize(corner));
                }
                else
                {
                    context.AddRect(Conversions.GetCGRect(frame));
                }
                return(frame);
            }, pen, brush);
        }