Example #1
0
        public override void DrawRectangle(PKPen pen, int x, int y, int w, int h, PKRectangleCorners corners)
        {
            if (h > 0 & w > 0)
            {
                var rect = PKRoundedRectangle.Create(x, y, w, h, 5, corners);

                using (Pen p = new Pen(Color.FromArgb(pen.Color.A, pen.Color.R, pen.Color.G, pen.Color.B), pen.Size))
                {
                    graphics.DrawPath(p, rect);
                }
            }
        }
Example #2
0
        public override void FillRectangle(PKBrush brush, int x, int y, int w, int h, PKRectangleCorners corners)
        {
            if (h > 0 & w > 0)
            {
                var rect = PKRoundedRectangle.Create(x, y, w, h, 5, corners);

                using (Brush b = FromBrush(brush, x, y, w, h))
                {
                    graphics.FillPath(b, rect);
                    graphics.DrawPath(Pens.Black, rect);
                }
            }
        }