Method function IGDIPlus.IGPGraphicsPath.Widen(IGPPen;IGPMatrix;Single) : TGPGraphicsPath
This is a Beta Read Only version of this page. Please review and send recommendations to email@example.com. We will enable the editing as soon as we are happy with the overall Wiki site.
Visual C++ (MFC):
Widen( pen, matrix, flatness );
Replaces this path with curves that enclose the area that is filled when the path is drawn by a specified pen.
Call this method to replace the path with curves that enclose
the area that is filled when this path is drawn by a specified pen. The Widen method also flattens the path. Example: The following example creates a TGPGraphicsPath object and adds a closed curve to the path. The code creates a green pen that has a width of 10 and passes the address of that pen to the Widen method. Then the code draws the path with a blue pen of width 1.
var AGraphics : IGPGraphics; APath : IGPGraphicsPath; begin AGraphics := TGPGraphics.Create( ACanvas ); APath := TGLPath.Create();
MakePointF(20.0f, 20.0f), MakePointF(160.0f, 100.0f), MakePointF(140.0f, 60.0f), MakePointF(60.0f, 100.0f) ] );
APath.Widen( TGPPen.Create( aclGreen, 10 ) ); graphics.DrawPath( TGPPen.Create( aclBlue ), APath ); end;