Home COM GDI+ WebBrowser Data Access 

GraphicsPath Functions (GDI+)

 

 

A GraphicsPath object stores a sequence of lines, curves, and shapes. You can draw the entire sequence by calling the GdipDrawPath function. You can partition the sequence of lines, curves, and shapes into figures, and with the help of the PathIterator functions, you can draw selected figures. You can also place markers in the sequence, so that you can draw selected portions of the path.

 

Return Values

If the function succeeds, it returns Ok, which is an element of the Status enumeration.

 

If the function fails, it returns one of the other elements of the Status enumeration.

 

GdipClearPathMarkers

 

Description

Clears the markers from this path.

Syntax

GpStatus WINGDIPAPI GdipClearPathMarkers(

    GpPath* path

);

PowerBASIC Syntax

DECLARE FUNCTION GdipClearPathMarkers ( _

    BYVAL path AS DWORD _

) AS LONG

Parameters

 

path

[in] Pointer to a GraphicsPath object.

 

GdipClonePath

 

Description

Creates a new GraphicsPath object, and initializes it with the contents of this GraphicsPath object.

Syntax

GpStatus WINGDIPAPI GdipClonePath(

    GpPath* path,

    GpPath **clonePath

);

PowerBASIC Syntax

DECLARE FUNCTION GdipClonePath ( _

    BYVAL path AS DWORD, _

    BYREF clonePath AS DWORD _

) AS LONG

Parameters

 

path

[in] Pointer to a GraphicsPath object.

clonePath

[out] Pointer to the new GraphicsPath object.

 

GdipClosePathFigure

 

Description

Closes the current figure of this path.

Syntax

GpStatus WINGDIPAPI GdipClosePathFigure(

    GpPath *path

);

PowerBASIC Syntax

DECLARE FUNCTION GdipClosePathFigure ( _

    BYVAL path AS DWORD _

) AS LONG

Parameters

 

path

[in] Pointer to a GraphicsPath object.

 

GdipClosePathFigures

 

Description

Closes all open figures in this path.

Syntax

GpStatus WINGDIPAPI GdipClosePathFigures(

    GpPath *path

);

PowerBASIC Syntax

DECLARE FUNCTION GdipClosePathFigures ( _

    BYVAL path AS DWORD _

) AS LONG

Parameters

 

path

[in] Pointer to a GraphicsPath object.

 

GdipCreatePath

 

Description

Creates a GraphicsPath object and initializes the fill mode.

Syntax

GpStatus WINGDIPAPI GdipCreatePath(

    GpFillMode brushMode,

    GpPath **path

);

PowerBASIC Syntax

DECLARE FUNCTION GdipCreatePath ( _

    BYVAL brushMode AS LONG, _

    BYREF path AS DWORD _

) AS LONG

Parameters

 

brushMode

[in] Element of the FillMode enumeration that specifies how areas are filled if the path intersects itself. The default value is FillModeAlternate.

path

[out] Pointer to a variable that receives a pointer to the new GraphicsPath object.

 

GdipCreatePath2

 

Description

Creates a GraphicsPath object and initializes the fill mode.

Syntax

GpStatus WINGDIPAPI GdipCreatePath2(

    GDIPCONST GpPointF* points,

    GDIPCONST BYTE* types,

    INT count,

    GpFillMode fillMode,

    GpPath **path

);

PowerBASIC Syntax

DECLARE FUNCTION GdipCreatePath2 ( _

    BYREF pPoints AS PointF, _

    BYREF types AS ANY, _

    BYVAL count AS LONG, _

    BYVAL fillMode AS LONG, _

    BYREF path AS DWORD _

) AS LONG

Parameters

 

points

[in] Pointer to an array of points that specifies the endpoints and control points of the lines and Bezier splines that are used to draw the path.

types

[in] Pointer to an array of bytes that holds the point type and a set of flags for each point in the points array. The point type is stored in the three least significant bits, and the flags are stored in the four most significant bits. Possible point types and flags are listed in the PathPointType enumeration.

count

[in] Long integer value that specifies the number of elements in the points array. This is the same as the number of elements in the types array.

fillMode

[in] Element of the FillMode enumeration that specifies how areas are filled if the path intersects itself. The default value is FillModeAlternate.

path

[out] Pointer to a variable that receives a pointer  the new GraphicsPath object.

 

GdipCreatePath2I

 

Description

Creates a GraphicsPath object and initializes the fill mode.

Syntax

GpStatus WINGDIPAPI GdipCreatePath2I(

    GDIPCONST GpPoint* points,

    GDIPCONST BYTE* types,

    INT count,

    GpFillMode fillMode,

    GpPath **path

);

PowerBASIC Syntax

DECLARE FUNCTION GdipCreatePath2I ( _

    BYREF pPoints AS PointL, _

    BYREF types AS ANY, _

    BYVAL count AS LONG, _

    BYVAL fillMode AS LONG, _

    BYREF path AS DWORD _

) AS LONG

Parameters

 

points

[in] Pointer to an array of points that specifies the endpoints and control points of the lines and Bezier splines that are used to draw the path.

types

[in] Pointer to an array of bytes that holds the point type and a set of flags for each point in the points array. The point type is stored in the three least significant bits, and the flags are stored in the four most significant bits. Possible point types and flags are listed in the PathPointType enumeration.

count

[in] Long integer value that specifies the number of elements in the points array. This is the same as the number of elements in the types array.

fillMode

[in] Element of the FillMode enumeration that specifies how areas are filled if the path intersects itself. The default value is FillModeAlternate.

path

[out] Pointer to a variable that receives a pointer to the new GraphicsPath object.

 

GdipDeletePath

 

Description

Deletes the specified GraphicsPath object.

Syntax

GpStatus WINGDIPAPI GdipDeletePath(

    GpPath* path

);

PowerBASIC Syntax

DECLARE FUNCTION GdipDeletePath ( _

    BYVAL path AS DWORD _

) AS LONG

Parameters

 

path

[in] Pointer to the GraphicsPath object to delete.

 

GdipFlattenPath

 

Description

Applies a transformation to this path and converts each curve in the path to a sequence of connected lines.

Syntax

GpStatus WINGDIPAPI GdipFlattenPath(

    GpPath *path,

    GpMatrix* matrix,

    REAL flatness

);

PowerBASIC Syntax

DECLARE FUNCTION GdipFlattenPath ( _

    BYVAL path AS DWORD, _

    BYVAL matrix AS DWORD, _

    BYVAL flatness AS SINGLE _

) AS LONG

Parameters

 

path

[in] Pointer to a GraphicsPath object.

matrix

[in] Pointer to a Matrix object that specifies the transformation to be applied to the path's data points. The default value is NULL, which specifies that no transformation is to be applied.

flatness

[in] Simple precision value that specifies the maximum error between the path and its flattened approximation. Reducing the flatness increases the number of line segments in the approximation. The default value is FlatnessDefault.

 

GdipGetPathData

 

Description

Gets an array of points and an array of point types from this path. Together, these two arrays define the lines, curves, figures, and markers of this path.

Syntax

GpStatus WINGDIPAPI GdipGetPathData(

    GpPath *path,

    GpPathData* pathData

);

PowerBASIC Syntax

DECLARE FUNCTION GdipGetPathData ( _

    BYVAL path AS DWORD, _

    BYREF pData AS PathData _

) AS LONG

Parameters

 

path

[in] Pointer to a GraphicsPath object.

pathData

[out] Pointer to a PathData structure that receives the path data. The Points data member of the PathData structure receives a pointer to an array of PointF structures that contains the path points. The Types data member of the PathData structure receives a pointer to an array of bytes that contains the point types. The Count data member of the PathData structure receives an integer that indicates the number of elements in the Points array.

Remarks

A GraphicsPath object has an array of points and an array of types. Each element in the array of types is a byte that specifies the point type and a set of flags for the corresponding element in the array of points. Possible point types and flags are listed in the PathPointType enumeration.

 

GdipGetPathFillMode

 

Description

Sets the fill mode of this path.

Syntax

GpStatus WINGDIPAPI GdipGetPathFillMode(

    GpPath *path,

    GpFillMode *fillmode

);

PowerBASIC Syntax

DECLARE FUNCTION GdipGetPathFillMode ( _

    BYVAL path AS DWORD, _

    BYREF fillMode AS LONG _

) AS LONG

Parameters

 

path

[in] Pointer to a GraphicsPath object.

fillMode

[out] Pointer to a variable that receives an element of the FillMode enumeration that specifies how to fill areas when the path intersects itself.

 

GdipGetPathLastPoint

 

Description

Gets the ending point of the last figure in this path.

Syntax

GpStatus WINGDIPAPI GdipGetPathLastPoint(

    GpPath* path,

    GpPointF* lastPoint

);

PowerBASIC Syntax

DECLARE FUNCTION GdipGetPathLastPoint ( _

    BYVAL path AS DWORD, _

    BYREF lastPoint AS PointF _

) AS LONG

Parameters

 

path

[in] Pointer to a GraphicsPath object.

lastPoint

[out] Pointer to a PointF structure that receives the last point.

 

GdipGetPathPoints

 

Description

Gets this path's array of points. The array contains the endpoints and control points of the lines and Bézier splines that are used to draw the path.

Syntax

GpStatus WINGDIPAPI GdipGetPathPoints(

    GpPath* path,

    GpPointF* points,

    INT count

);

PowerBASIC Syntax

DECLARE FUNCTION GdipGetPathPoints ( _

    BYVAL path AS DWORD, _

    BYREF pPoints AS PointF, _

    BYVAL count AS LONG _

) AS LONG

Parameters

 

path

[in] Pointer to a GraphicsPath object.

points

[out] Pointer to an array of PointF structures that receives the data points. You must allocate memory for this array. You can call the GdipGetPointCount function to determine the required size of the array. The size, in bytes, should be the return value of GdipGetPointCount multiplied by sizeof(PointF).

count

[in] Long integer value that specifies the number of elements in the points array. Set this parameter equal to the return value of the GdipGetPointCount function.

 

GdipGetPathPointsI

 

Description

Gets this path's array of points. The array contains the endpoints and control points of the lines and Bézier splines that are used to draw the path.

Syntax

GpStatus WINGDIPAPI GdipGetPathPointsI(

    GpPath* path,

    GpPoint* points,

    INT count

);

PowerBASIC Syntax

DECLARE FUNCTION GdipGetPathPointsI ( _

    BYVAL path AS DWORD, _

    BYREF pPoints AS PointL, _

    BYVAL count AS LONG _

) AS LONG

Parameters

 

path

[in] Pointer to a GraphicsPath object.

points

[out] Pointer to an array of PointL structures that receives the data points. You must allocate memory for this array. You can call the GdipGetPointCount function to determine the required size of the array. The size, in bytes, should be the return value of GdipGetPointCount multiplied by sizeof(PointF).

count

[in] Long integer value that specifies the number of elements in the points array. Set this parameter equal to the return value of the GdipGetPointCount function.

 

GdipGetPathTypes

 

Description

Gets this path's array of points. The array contains the endpoints and control points of the lines and Bézier splines that are used to draw the path.

Syntax

GpStatus WINGDIPAPI GdipGetPathTypes(

    GpPath* path,

    BYTE* types,

    INT count

);

PowerBASIC Syntax

DECLARE FUNCTION GdipGetPathTypes ( _

    BYVAL path AS DWORD, _

    BYREF types AS ANY, _

    BYVAL count AS LONG _

) AS LONG

Parameters

 

path

[in] Pointer to a GraphicsPath object.

types

[out] Pointer to an array that receives the point types. You must allocate memory for this array. You can call the GdipGetPointCount method to determine the required size of the array.

count

[in] Long integer values that specifies the number of elements in the types array. Set this parameter equal to the return value of the GdipGetPointCount function.

 

GdipGetPathWorldBounds

 

Description

Gets a bounding rectangle for this path.

Syntax

GpStatus WINGDIPAPI GdipGetPathWorldBounds(

    GpPath* path,

    GpRectF* bounds,

    GDIPCONST GpMatrix *matrix,

    GDIPCONST GpPen *pen

);

PowerBASIC Syntax

DECLARE FUNCTION GdipGetPathWorldBounds ( _

    BYVAL path AS DWORD, _

    BYREF bounds AS RectF, _

    BYVAL matrix AS DWORD, _

    BYVAL pen AS DWORD _

) AS LONG

Parameters

 

path

[in] Pointer to a GraphicsPath object.

bounds

[out] Pointer to a RectF structure that receives the bounding rectangle.

matrix

[in] Pointer to a Matrix object that specifies a transformation to be applied to this path before the bounding rectangle is calculated. This path is not permanently transformed; the transformation is used only during the process of calculating the bounding rectangle. The default value is NULL.

pen

[in] Pointer to a Pen object that influences the size of the bounding rectangle. The bounding rectangle received in bounds will be large enough to enclose this path when the path is drawn with the pen specified by this parameter. This ensures that the path is enclosed by the bounding rectangle even if the path is drawn with a wide pen. The default value is NULL.

Remarks

The rectangle returned by this method might be larger than necessary to enclose the path as drawn by the specified pen. The rectangle is calculated to allow for the pen's miter limit at sharp corners and to allow for the pen's end caps.

 

GdipGetPathWorldBoundsI

 

Description

Gets a bounding rectangle for this path.

Syntax

GpStatus WINGDIPAPI GdipGetPathWorldBoundsI(

    GpPath* path,

    GpRect* bounds,

    GDIPCONST GpMatrix *matrix,

    GDIPCONST GpPen *pen

);

PowerBASIC Syntax

DECLARE FUNCTION GdipGetPathWorldBoundsI ( _

    BYVAL path AS DWORD, _

    BYREF bounds AS RectL, _

    BYVAL matrix AS DWORD, _

    BYVAL pen AS DWORD _

) AS LONG

Parameters

 

path

[in] Pointer to a GraphicsPath object.

bounds

[out] Pointer to a RectL structure that receives the bounding rectangle.

matrix

[in] Pointer to a Matrix object that specifies a transformation to be applied to this path before the bounding rectangle is calculated. This path is not permanently transformed; the transformation is used only during the process of calculating the bounding rectangle. The default value is NULL.

pen

[in] Pointer to a Pen object that influences the size of the bounding rectangle. The bounding rectangle received in bounds will be large enough to enclose this path when the path is drawn with the pen specified by this parameter. This ensures that the path is enclosed by the bounding rectangle even if the path is drawn with a wide pen. The default value is NULL.

Remarks

The rectangle returned by this method might be larger than necessary to enclose the path as drawn by the specified pen. The rectangle is calculated to allow for the pen's miter limit at sharp corners and to allow for the pen's end caps.

 

GdipGetPointCount

 

Description

Gets the number of points in this path's array of data points. This is the same as the number of types in the path's array of point types.

Syntax

GpStatus WINGDIPAPI GdipGetPointCount(

    GpPath* path,

    INT* count

);

PowerBASIC Syntax

DECLARE FUNCTION GdipGetPointCount ( _

    BYVAL path AS DWORD, _

    BYREF count AS LONG _

) AS LONG

Parameters

 

path

[in] Pointer to a GraphicsPath object.

count

[out] Pointer to a variable thagt receives the number of points in the path's array of data points.

 

GdipIsOutlineVisiblePathPoint

 

Description

Determines whether a specified point touches the outline of this path when the path is drawn by a specified Graphics object and a specified pen.

Syntax

GpStatus WINGDIPAPI GdipIsOutlineVisiblePathPoint(

    GpPath* path,

    REAL x,

    REAL y,

    GpPen *pen,

    GpGraphics *graphics,

    BOOL *result

);

PowerBASIC Syntax

DECLARE FUNCTION GdipIsOutlineVisiblePathPoint ( _

    BYVAL path AS DWORD, _

    BYVAL x AS SINGLE, _

    BYVAL y AS SINGLE, _

    BYVAL pen AS DWORD, _

    BYVAL graphics AS DWORD, _

    BYREF result AS LONG _

) AS LONG

Parameters

 

path

[in] Pointer to a GraphicsPath object.

x

[in] Simple precision number that specifies the x-coordinate of the point to be tested.

y

[in] Simple precision number that specifies the x-coordinate of the point to be tested.

pen

[in] Pointer to a Pen object. This method determines whether the test point touches the path outline that would be drawn by this pen. More points will touch an outline drawn by a wide pen than will touch an outline drawn by a narrow pen.

graphics

[in] Pointer to a Graphics object that specifies a world-to-device transformation. If the value of this parameter is NULL, the test is done in world coordinates; otherwise, the test is done in device coordinates. The default value is NULL.

result

[out] Pointer to a variable that receives a boolean value indicating whether test point touches the outline of this path (TRUE) or not (FALSE).

 

GdipIsOutlineVisiblePathPointI

 

Description

Determines whether a specified point touches the outline of this path when the path is drawn by a specified Graphics object and a specified pen.

Syntax

GpStatus WINGDIPAPI GdipIsOutlineVisiblePathPointI(

    GpPath* path,

    INT x,

    INT y,

    GpPen *pen,

    GpGraphics *graphics,

    BOOL *result

);

PowerBASIC Syntax

DECLARE FUNCTION GdipIsOutlineVisiblePathPointI ( _

    BYVAL path AS DWORD, _

    BYVAL x AS LONG, _

    BYVAL y AS LONG, _

    BYVAL pen AS DWORD, _

    BYVAL graphics AS DWORD, _

    BYREF result AS LONG _

) AS LONG

Parameters

 

path

[in] Pointer to a GraphicsPath object.

x

[in] Long integer value that specifies the x-coordinate of the point to be tested.

y

[in] Long integer value that specifies the x-coordinate of the point to be tested.

pen

[in] Pointer to a Pen object. This method determines whether the test point touches the path outline that would be drawn by this pen. More points will touch an outline drawn by a wide pen than will touch an outline drawn by a narrow pen.

graphics

[in] Pointer to a Graphics object that specifies a world-to-device transformation. If the value of this parameter is NULL, the test is done in world coordinates; otherwise, the test is done in device coordinates. The default value is NULL.

result

[out] Pointer to a variable that receives a boolean value indicating whether test point touches the outline of this path (TRUE) or not (FALSE).

 

GdipIsVisiblePathPoint

 

Description

Determines whether a specified point lies in the area that is filled when this path is filled by a specified Graphics object.

Syntax

GpStatus WINGDIPAPI GdipIsVisiblePathPoint(

    GpPath* path,

    REAL x,

    REAL y,

    GpGraphics *graphics,

    BOOL *result

);

PowerBASIC Syntax

DECLARE FUNCTION GdipIsVisiblePathPoint ( _

    BYVAL path AS DWORD, _

    BYVAL x AS SINGLE, _

    BYVAL y AS SINGLE, _

    BYVAL graphics AS DWORD, _

    BYREF result AS LONG _

) AS LONG

Parameters

 

path

[in] Pointer to a GraphicsPath object.

x

[in] Simple precision value that specifies the x-coordinate of the point to be tested.

y

[in] Simple precision value that specifies the x-coordinate of the point to be tested.

graphics

[in] Pointer to a Graphics object that specifies a world-to-device transformation. If the value of this parameter is NULL, the test is done in world coordinates; otherwise, the test is done in device coordinates. The default value is NULL.

result

[out] Pointer to a variable that receives a boolean value indicating whether test point lies in the interior of this path (TRUE) or not (FALSE).

 

GdipIsVisiblePathPointI

 

Description

Determines whether a specified point lies in the area that is filled when this path is filled by a specified Graphics object.

Syntax

GpStatus WINGDIPAPI GdipIsVisiblePathPointI(

    GpPath* path,

    INT x,

    INT y,

    GpGraphics *graphics,

    BOOL *result

);

PowerBASIC Syntax

DECLARE FUNCTION GdipIsVisiblePathPointI ( _

    BYVAL path AS DWORD, _

    BYVAL x AS LONG, _

    BYVAL y AS LONG, _

    BYVAL graphics AS DWORD, _

    BYREF result AS LONG _

) AS LONG

Parameters

 

path

[in] Pointer to a GraphicsPath object.

x

[in] Long integer value that specifies the x-coordinate of the point to be tested.

y

[in] Long integer value that specifies the x-coordinate of the point to be tested.

graphics

[in] Pointer to a Graphics object that specifies a world-to-device transformation. If the value of this parameter is NULL, the test is done in world coordinates; otherwise, the test is done in device coordinates. The default value is NULL.

result

[out] Pointer to a variable that receives a boolean value indicating whether test point lies in the interior of this path (TRUE) or not (FALSE).

 

GdipResetPath

 

Description

Empties the path and sets the fill mode to FillModeAlternate.

Syntax

GpStatus WINGDIPAPI GdipResetPath(

    GpPath* path

);

PowerBASIC Syntax

DECLARE FUNCTION GdipResetPath ( _

    BYVAL path AS DWORD _

) AS LONG

Parameters

 

path

[in] Pointer to a GraphicsPath object.

 

GdipReversePath

 

Description

Reverses the order of the points that define this path's lines and curves.

Syntax

GpStatus WINGDIPAPI GdipReversePath(

    GpPath* path

);

PowerBASIC Syntax

DECLARE FUNCTION GdipReversePath ( _

    BYVAL path AS DWORD _

) AS LONG

Parameters

 

path

[in] Pointer to a GraphicsPath object.

 

GdipSetPathFillMode

 

Description

Sets the fill mode of this path.

Syntax

GpStatus WINGDIPAPI GdipSetPathFillMode(

    GpPath *path,

    GpFillMode fillmode

);

PowerBASIC Syntax

DECLARE FUNCTION GdipSetPathFillMode ( _

    BYVAL path AS DWORD, _

    BYVAL fillMode AS LONG _

) AS LONG

Parameters

 

path

[in] Pointer to a GraphicsPath object.

fillMode

[in] Element of the FillMode enumeration that specifies how to fill areas when the path intersects itself.

 

GdipSetPathMarker

 

Description

Designates the last point in this path as a marker point.

Syntax

GpStatus WINGDIPAPI GdipSetPathMarker(

    GpPath* path

);

PowerBASIC Syntax

DECLARE FUNCTION GdipSetPathMarker ( _

    BYVAL path AS DWORD _

) AS LONG

Parameters

 

path

[in] Pointer to a GraphicsPath object.

 

GdipStartPathFigure

 

Description

Starts a new figure without closing the current figure. Subsequent points added to this path are added to the new figure.

Syntax

GpStatus WINGDIPAPI GdipStartPathFigure(

    GpPath *path

);

PowerBASIC Syntax

DECLARE FUNCTION GdipStartPathFigure ( _

    BYVAL path AS DWORD _

) AS LONG

Parameters

 

path

[in] Pointer to a GraphicsPath object.

 

GdipTransformPath

 

Description

Multiplies each of this path's data points by a specified matrix.

Syntax

GpStatus WINGDIPAPI GdipTransformPath(

    GpPath* path,

    GpMatrix* matrix

);

PowerBASIC Syntax

DECLARE FUNCTION GdipTransformPath ( _

    BYVAL path AS DWORD, _

    BYVAL matrix AS DWORD _

) AS LONG

Parameters

 

path

[in] Pointer to a GraphicsPath object.

matrix

[in] Pointer to a Matrix object that specifies the transformation.

 

GdipWarpPath

 

Description

Applies a warp transformation to this path. The Warp method also flattens (converts to a sequence of straight lines) the path.

Syntax

GpStatus WINGDIPAPI GdipWarpPath(

    GpPath *path,

    GpMatrix* matrix,

    GDIPCONST GpPointF *points,

    INT count,

    REAL srcx,

    REAL srcy,

    REAL srcwidth,

    REAL srcheight,

    WarpMode warpMode,

    REAL flatness

);

PowerBASIC Syntax

DECLARE FUNCTION GdipWarpPath ( _

    BYVAL path AS DWORD, _

    BYVAL matrix AS DWORD, _

    BYREF pPoints AS PointF, _

    BYVAL count AS LONG, _

    BYVAL srcx AS SINGLE, _

    BYVAL srcy AS SINGLE, _

    BYVAL srcwidth AS SINGLE, _

    BYVAL srcheight AS SINGLE, _

    BYVAL warpMode AS LONG, _

    BYVAL Flatness AS SINGLE _

) AS LONG

Parameters

 

path

[in] Pointer to a GraphicsPath object.

matrix

[in] Pointer to a Matrix object that represents a transformation to be applied along with the warp. If this parameter is NULL, no transformation is applied. The default value is NULL.

points

[in] Pointer to an array of points that, along with the srcRect parameter, defines the warp transformation.

count

[in] Long integer value that specifies the number of points in the destPoints array. The value of this parameter must be 3 or 4.

srcx

[in] Simple precision value that specifies the x-coordinate of the upper-left corner of the  rectangle that, along with the destPoints parameter, defines the warp transformation.

srcy

[in] Simple precision value that specifies the y-coordinate of the upper-left corner of the rectangle that, along with the destPoints parameter, defines the warp transformation.

srcwidth

[in] Simple precision value that specifies the width of the rectangle that, along with the destPoints parameter, defines the warp transformation.

srcheight

[in] Real number that specifies the height of the rectangle that, along with the destPoints parameter, defines the warp transformation.

warpMode

[in] Element of the WarpMode enumeration that specifies the kind of warp to be applied. The default value is WarpModePerspective.

flatness

[in] Simple precision value that influences the number of line segments that are used to approximate the original path. Small values specify that many line segments are used, and large values specify that few line segments are used. The default value is FlatnessDefault.

Remarks

A GraphicsPath object stores a collection of data points that represent lines and curves. The Warp method converts those data points so that they represent only lines. The flatness parameter influences the number of lines that are stored. The original data points that represented curves are lost.

 

If the count parameter has a value of 4, the warp transformation is defined as shown in the following table.

 

Source point

Destination point

Upper-left corner of srcRect

destPoints[0]

Upper-right corner of srcRect

destPoints[1]

Lower-left corner of srcRect

destPoints[2]

Lower-right corner of srcRect

destPoints[3]

 

A transformation specified by a source rectangle and four destination points is capable of mapping a rectangle to an arbitrary quadrilateral that is not necessarily a parallelogram.

 

If the count parameter has a value of 3, the warp transformation is defined as shown in the following table.

 

Source point

Destination point

Upper-left corner of srcRect

destPoints[0]

Upper-right corner of srcRect

destPoints[1]

Lower-left corner of srcRect

destPoints[2]

 

A transformation specified by a source rectangle and three destination points maps rectangles to parallelograms.

 

GdipWidenPath

 

Description

Replaces this 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.

Syntax

GpStatus WINGDIPAPI GdipWidenPath(

    GpPath *nativePath,

    GpPen *pen,

    GpMatrix *matrix,

    REAL flatness

);

PowerBASIC Syntax

DECLARE FUNCTION GdipWidenPath ( _

    BYVAL nativePath AS LONG, _

    BYVAL pen AS DWORD, _

    BYVAL matrix AS DWORD, _

    BYVAL flatness AS SINGLE _

) AS LONG

Parameters

 

nativePath

[in] Pointer to a GraphicsPath object.

pen

[in] Pointer to a Pen object. The path is made as wide as it would be when drawn by this pen.

matrix

[in] Pointer to a Matrix object that specifies a transformation to be applied along with the widening. If this parameter is NULL, no transformation is applied. The default value is NULL.

flatness

[in] Simple precision value that specifies the maximum error between the path and its flattened approximation. Reducing the flatness increases the number of line segments in the approximation. The default value is FlatnessDefault.

 

GdipWindingModeOutline

 

Description

Transforms and flattens this path, and then converts this path's data points so that they represent only the outline of the path.

Syntax

GpStatus WINGDIPAPI GdipWindingModeOutline(

    GpPath *path,

    GpMatrix *matrix,

    REAL flatness

);

PowerBASIC Syntax

DECLARE FUNCTION GdipWindingModeOutline ( _

    BYVAL path AS DWORD, _

    BYVAL matrix AS DWORD, _

    BYVAL flatness AS SINGLE _

) AS LONG

Parameters

 

path

[in] Pointer to a GraphicsPath object.

matrix

[in] Pointer to a Matrix object that specifies the transformation. If this parameter is NULL, no transformation is applied. The default value is NULL.

flatness

[in] Simple prevision value that specifies the maximum error between the path and its flattened approximation. Reducing the flatness increases the number of line segments in the approximation.. The default value is FlatnessDefault.

 

Page last updated on Thursday, 04 January 2007 19:08:24 +0100