Method function IGDIPlus.IGPGraphicsPath.Widen(IGPPen;IGPMatrix;Single) : TGPGraphicsPath
From Mitov Wiki Doc
This is a Beta Read Only version of this page. Please review and send recommendations to mitov@mitov.com. We will enable the editing as soon as we are happy with the overall Wiki site.
Class: IGPGraphicsPath
Contents |
Syntax
Delphi:
function Widen( pen : IGPPen, matrix : IGPMatrix, flatness : Single ) : TGPGraphicsPath;
C++ Builder:
TGPGraphicsPath __fastcall Widen( IGPPen pen, IGPMatrix matrix, float flatness );
Visual C++ (MFC):
Widen( pen, matrix, flatness );
Summary
Replaces this path with curves that enclose the area that is filled when the path is drawn by a specified pen.
Description
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();
APath.AddClosedCurve( [
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;