Utilities.Media.SwiftBitmap.DrawPath C# (CSharp) Method

DrawPath() public method

Draws the path specified
public DrawPath ( Pen pen, GraphicsPath path ) : SwiftBitmap
pen System.Drawing.Pen The pen to use.
path System.Drawing.Drawing2D.GraphicsPath The path to draw
return SwiftBitmap
        public SwiftBitmap DrawPath(Pen pen, GraphicsPath path)
        {
            Contract.Requires<ArgumentNullException>(pen != null);
            Contract.Requires<ArgumentNullException>(path != null);
            Contract.Requires<NullReferenceException>(InternalBitmap != null);
            Unlock();
            using (Graphics NewGraphics = Graphics.FromImage(InternalBitmap))
            {
                NewGraphics.DrawPath(pen, path);
            }
            return this;
        }