System.Drawing.Drawing2D.GraphicsPath.GraphicsPath C# (CSharp) Method

GraphicsPath() public method

public GraphicsPath ( Point pts, byte types, FillMode fillMode ) : CoreGraphics
pts Point
types byte
fillMode FillMode
return CoreGraphics
        public GraphicsPath(Point [] pts, byte [] types, FillMode fillMode)
        {
            if (pts == null)
                throw new ArgumentNullException ("pts");
            if (types == null)
                throw new ArgumentNullException ("types");
            if (pts.Length != types.Length)
                throw new ArgumentException ("Invalid parameter passed. Number of points and types must be same.");

            this.fillMode = fillMode;
            foreach (int type in types){
                if (type == 0 || type == 1 || type == 3 || type == 16 || type == 32 || type == 128)
                    continue;
                throw new ArgumentException ("The pts array contains an invalid value for PathPointType: " + type);
            }

            this.points = new List<PointF> ();
            foreach (var point in pts)
                points.Add (new PointF (point.X, point.Y));

            this.types = new List<byte> (types);
        }

Same methods

GraphicsPath::GraphicsPath ( ) : CoreGraphics
GraphicsPath::GraphicsPath ( FillMode fillMode ) : CoreGraphics
GraphicsPath::GraphicsPath ( Point pts, byte types ) : CoreGraphics
GraphicsPath::GraphicsPath ( PointF pts, byte types ) : CoreGraphics
GraphicsPath::GraphicsPath ( PointF pts, byte types, FillMode fillMode ) : CoreGraphics