static void Bezier() { CDrawer can = new CDrawer(800, 600, false); for (int ix = 0; ix < 800; ix += 50) { can.AddBezier(0, 600, ix, 0, 800 - ix, 600, 800, 0, Color.Red, 2); can.AddBezier(0, 0, ix, 0, 800 - ix, 600, 800, 600, Color.Red, 2); } can.Render(); Console.ReadKey(); }
//****************************************************** //Render Method: Draw beizer around the parent shape. //****************************************************** public override void Render(CDrawer drawer) { //Draw line to parent base.Render(drawer); drawer?.AddBezier(_startPoint.X, _startPoint.Y, _ControlPoint1.X, _ControlPoint1.Y, _ControlPoint2.X, _ControlPoint2.Y, _endPoint.X, _endPoint.Y, Color.White, 1); }