System.Drawing.Graphics.DrawCurve C# (CSharp) Method

DrawCurve() public method

public DrawCurve ( Pen pen, Point points, float tension = 0.5f ) : void
pen Pen
points Point
tension float
return void
        public void DrawCurve(Pen pen, Point [] points, float tension = 0.5f)
        {
            DrawCurve (pen, ConvertPoints (points), tension);
        }

Same methods

Graphics::DrawCurve ( Pen pen, Point points, int offset, int numberOfSegments, float tension = 0.5f ) : void
Graphics::DrawCurve ( Pen pen, PointF points, float tension = 0.5f ) : void
Graphics::DrawCurve ( Pen pen, PointF points, int offset, int numberOfSegments, float tension = 0.5f ) : void

Usage Example

Example #1
0
        public void Draw(Graphics g, Player player)
        {
            if (ShootingPoints.Count > 0)
            {
                try
                {
                    g.DrawCurve(shootingPen, ShootingPoints.ToArray());
                    g.TranslateTransform(1, 0);
                    g.DrawCurve(shootingPen1, ShootingPoints.ToArray());
                    g.ResetTransform();
                }
                catch (Exception e)
                {
                    Console.WriteLine("Shot.cs-Draw-EXCEPTION :  {0}", e.Message);
                }
                //STRELKA
                Point lastOne = (Point)ShootingPoints[ShootingPoints.Count-1];
                trianglePoints = new Point[3];

                trianglePoints[0] = new Point(lastOne.X - 2, lastOne.Y - 10);
                trianglePoints[1] = new Point(lastOne.X - 8, lastOne.Y + 2);
                trianglePoints[2] = new Point(lastOne.X + 4, lastOne.Y + 2);

                g.FillPolygon(new SolidBrush(Color.Black), trianglePoints);
                trianglePoints = new Point[3];
            }
        }
All Usage Examples Of System.Drawing.Graphics::DrawCurve