Exemplo n.º 1
0
        static void DrawBezier(XGraphics gfx, int number)
        {
            BeginBox(gfx, number, "DrawBezier");

            gfx.DrawBezier(new XPen(XColors.DarkRed, 5), 20, 110, 40, 10, 170, 90, 230, 20);

            EndBox(gfx);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Demonstrates the use of XGraphics.DrawBezier.
        /// </summary>
        public override void RenderPage(XGraphics gfx)
        {
            base.RenderPage(gfx);

            gfx.DrawEllipse(XBrushes.Red, MakeRect(50, 100));
            gfx.DrawEllipse(XBrushes.Red, MakeRect(450, 100));
            gfx.DrawEllipse(XBrushes.Red, MakeRect(550, 190));
            gfx.DrawEllipse(XBrushes.Red, MakeRect(150, 300));

            gfx.DrawLine(XPens.Red, 50, 100, 450, 100);
            gfx.DrawLine(XPens.Red, 550, 190, 150, 300);

            gfx.DrawBezier(properties.Pen2.Pen, 50, 100, 450, 100, 550, 190, 150, 300);

            //XPoint[] points = new XPoint[1 + 3 * 3];
            //Random rnd = new Random();
            //for (int idx = 0; idx < points.Length; idx++)
            //{
            //  points[idx].X = 100 + rnd.Next(400);
            //  points[idx].Y = 200 + rnd.Next(700);
            //}
            //gfx.DrawBeziers(properties.Pen1.Pen, points);
        }
Exemplo n.º 3
0
 public void DrawBezier(IPen pen, Point startPoint, Point controlPoint1, Point controlPoint2, Point endPoint, LineAnchor startAnchor, LineAnchor endAnchor)
 {
     Graphics.DrawBezier((XPen)pen.Raw, startPoint, controlPoint1, controlPoint2, endPoint);
 }
 private void DrawBezier(XGraphics gfx, int number)
 {
     base.BeginBox(gfx, number, "DrawBezier");
     gfx.DrawBezier(new XPen(XColors.DarkRed, 5.0), 20.0, 110.0, 40.0, 10.0, 170.0, 90.0, 230.0, 20.0);
     base.EndBox(gfx);
 }