Exemple #1
0
 public override void DrawEllipse(PKPen pen, int x, int y, int w, int h)
 {
     if (h > 0 & w > 0)
     {
         using (Pen p = new Pen(Color.FromArgb(pen.Color.A, pen.Color.R, pen.Color.G, pen.Color.B), pen.Size))
         {
             graphics.DrawEllipse(p, x, y, w, h);
         }
     }
 }
Exemple #2
0
        public override void DrawRectangle(PKPen pen, int x, int y, int w, int h)
        {
            if (h > 0 & w > 0)
            {
                using (Pen p = new Pen(Color.FromArgb(pen.Color.A, pen.Color.R, pen.Color.G, pen.Color.B), pen.Size))
                {
                    p.DashStyle = (DashStyle)pen.DashStyle;

                    graphics.DrawRectangle(p, x, y, w, h);
                }
            }
        }
Exemple #3
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);
                }
            }
        }