Exemplo n.º 1
0
        /// <summary>
        /// Draws the cut rectangle.
        /// </summary>
        /// <param name="gp">The gp.</param>
        /// <param name="pen">The pen.</param>
        /// <param name="x">The x.</param>
        /// <param name="y">The y.</param>
        /// <param name="width">The width.</param>
        /// <param name="height">The height.</param>
        /// <param name="radius">The radius.</param>
        /// <param name="corner">The corner.</param>
        public static void DrawCutRectangle(Graphics gp, System.Drawing.Pen pen, int x, int y,
                                            int width, int height, int radius, Corner corner)
        {
            float fx      = Convert.ToSingle(x);
            float fy      = Convert.ToSingle(y);
            float fwidth  = Convert.ToSingle(width);
            float fheight = Convert.ToSingle(height);
            float fradius = Convert.ToSingle(radius);

            GraphicsExtenions.DrawCutRectangle(gp, pen, fx, fy, fwidth, fheight, fradius, corner);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Fills the rounded rectangle.
        /// </summary>
        /// <param name="gp">The gp.</param>
        /// <param name="brush">The brush.</param>
        /// <param name="x">The x.</param>
        /// <param name="y">The y.</param>
        /// <param name="width">The width.</param>
        /// <param name="height">The height.</param>
        /// <param name="radius">The radius.</param>
        /// <param name="corner">The corner.</param>
        public static void FillRoundedRectangle(Graphics gp, System.Drawing.Brush brush,
                                                float x, float y,
                                                float width, float height, float radius, Corner corner = Corner.All)
        {
            GraphicsExtenions.FillRoundedRectangle(gp, brush, x, y, width, height, radius, 0, Color.Transparent, corner);
            //RectangleF rectangle = new RectangleF(x, y, width, height);
            //GraphicsPath path = GetRoundedRect(rectangle, radius, corner);
            //gp.FillPath(brush, path);

            //Pen pen = new Pen(System.Drawing.Color.Black,2);
            //gp.DrawPath(pen, path);
        }
Exemplo n.º 3
0
 /// <summary>
 /// Fills the circle.
 /// </summary>
 /// <param name="gp">The gp.</param>
 /// <param name="brush">The brush.</param>
 /// <param name="radius">The radius.</param>
 public static void FillCircle(Graphics gp, Brush brush, int radius)
 {
     GraphicsExtenions.FillCircle(gp, brush, new Rectangle(0, 0, radius, radius));
 }
Exemplo n.º 4
0
 /// <summary>
 /// Draws the circle.
 /// </summary>
 /// <param name="gp">The gp.</param>
 /// <param name="pen">The pen.</param>
 /// <param name="radius">The radius.</param>
 public static void DrawCircle(Graphics gp, Pen pen, int x, int y, int radius)
 {
     GraphicsExtenions.DrawCircle(gp, pen, new Rectangle(x, y, radius, radius));
 }