Home COM GDI+ WebBrowser Data Access 

CustomLineCap Functions (GDI+)

 

 

A line cap defines the style of graphic used to draw the ends of a line. It can be various shapes, such as a square, circle, or diamond. A custom line cap is defined by the path that draws it. The path is drawn by using a Pen object to draw the outline of a shape or by using a Brush object to fill the interior. The cap can be used on either or both ends of the line. Spacing can be adjusted between the end caps and the line.

 

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.

 

GdipCloneCustomLineCap

 

Description

Copies the contents of the existing object into a new CustomLineCap object.

Syntax

GpStatus WINGDIPAPI GdipCloneCustomLineCap(

    GpCustomLineCap* customCap,

    GpCustomLineCap** clonedCap

);

PowerBASIC Syntax

DECLARE FUNCTION GdipCloneCustomLineCap ( _

    BYVAL customCap AS DWORD, _

    BYREF clonedCap AS DWORD _

) AS LONG

Parameters

 

customCap

[in] Pointer to a CustomLineCap object.

clonedCap

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

 

GdipCreateCustomLineCap

 

Description

Creates a CustomLineCap object.

Syntax

GpStatus WINGDIPAPI GdipCreateCustomLineCap(

    GpPath* fillPath,

    GpPath* strokePath,

    GpLineCap baseCap,

    REAL baseInset,

    GpCustomLineCap **customCap

);

PowerBASIC Syntax

DECLARE FUNCTION GdipCreateCustomLineCap ( _

    BYVAL fillPath AS DWORD, _

    BYVAL strokePath AS DWORD, _

    BYVAL baseCap AS LONG, _

    BYVAL baseInset AS SINGLE, _

    BYREF customCap AS DWORD _

) AS LONG

Parameters

 

fillPath

[in] Pointer to a path.

strokePath

[in] Pointer to a path.

baseCap

[in] Element of the LineCap enumeration that specifies the line cap that will be used. The default value is LineCapFlat.

baseInset

[in] The default value is 0.

customCap

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

Remarks

The fillPath and strokePath parameters cannot be used at the same time. You should pass NULL to one of those two parameters. If you pass nonnull values to both parameters, then fillPath is ignored.

 

GdipDeleteCustomLineCap

 

Description

Deletes a CustomLineCap object.

Syntax

GpStatus WINGDIPAPI GdipDeleteCustomLineCap(

    GpCustomLineCap* customCap

);

PowerBASIC Syntax

DECLARE FUNCTION GdipDeleteCustomLineCap ( _

    BYVAL customCap AS DWORD _

) AS LONG

Parameters

 

customCap

[in] Pointer to a CustomLineCap object.

 

GdipGetCustomLineCapBaseCap

 

Description

Gets the style of the base cap. The base cap is a LineCap object used as a cap at the end of a line along with this CustomLineCap object.

Syntax

GpStatus WINGDIPAPI GdipGetCustomLineCapBaseCap(

    GpCustomLineCap* customCap,

    GpLineCap* baseCap

);

PowerBASIC Syntax

DECLARE FUNCTION GdipGetCustomLineCapBaseCap ( _

    BYVAL customCap AS DWORD, _

    BYREF baseCap AS LONG _

) AS LONG

Parameters

 

customCap

[in] Pointer to a CustomLineCap object.

baseCap

[out] Pointer to a LONG variable that receives the value of the line cap used at the base of the line.

 

GdipGetCustomLineCapBaseInset

 

Description

Gets the base inset value of this custom line cap. This is the distance between the end of a line and the base cap.

Syntax

GpStatus WINGDIPAPI GdipGetCustomLineCapBaseInset(

    GpCustomLineCap* customCap,

    REAL* inset

);

PowerBASIC Syntax

DECLARE FUNCTION GdipGetCustomLineCapBaseInset ( _

    BYVAL customCap AS LONG, _

    BYREF inset AS SINGLE _

) AS LONG

Parameters

 

customCap

[in] Pointer to a CustomLineCap object.

inset

[in] Single precision value that specifies the distance, in units, from the base cap to the start of the line.

 

GdipGetCustomLineCapStrokeCaps

 

Description

Gets the end cap styles for both the start line cap and the end line cap. Line caps are LineCap objects that end the individual lines within a path.

Syntax

GpStatus WINGDIPAPI GdipGetCustomLineCapStrokeCaps(

    GpCustomLineCap* customCap,

    GpLineCap* startCap,

    GpLineCap* endCap

);

PowerBASIC Syntax

DECLARE FUNCTION GdipGetCustomLineCapStrokeCaps ( _

    BYVAL customCap AS DWORD, _

    BYREF startCap AS LONG, _

    BYREF endCap AS LONG _

) AS LONG

Parameters

 

customCap

[in] Pointer to a CustomLineCap object.

startCap

[out] Pointer to a variable that receives an element of the LineCap enumeration that indicates the line cap used at the start of the line to be drawn.

endCap

[out] Pointer to a variable that receives an element of the LineCap enumeration that indicates the line cap used at the end of the line to be drawn.

 

GdipGetCustomLineCapStrokeJoin

 

Description

Gets the end cap styles for both the start line cap and the end line cap. Line caps are LineCap objects that end the individual lines within a path.

Syntax

GpStatus WINGDIPAPI GdipGetCustomLineCapStrokeJoin(

    GpCustomLineCap* customCap,

    GpLineJoin* lineJoin

);

PowerBASIC Syntax

DECLARE FUNCTION GdipGetCustomLineCapStrokeJoin ( _

    BYVAL CustomCap AS DWORD, _

    BYREF LineJoin AS LONG _

) AS LONG

Parameters

 

customCap

[in] Pointer to a CustomLineCap object.

startCap

[out] Pointer to a variable that receives an element of the LineCap enumeration that indicates the line cap used at the start of the line to be drawn.

endCap

[out] Pointer to a variable that receives an element of the LineCap enumeration that indicates the line cap used at the end of the line to be drawn.

 

GdipGetCustomLineCapType

 

Description

Gets the type of the CustomLineCap specified by customCap.

Syntax

GpStatus WINGDIPAPI GdipGetCustomLineCapType(

    GpCustomLineCap* customCap,

    CustomLineCapType* capType

);

PowerBASIC Syntax

DECLARE FUNCTION GdipGetCustomLineCapType ( _

    BYVAL customCap AS DWORD, _

    BYREF capType AS LONG _

) AS LONG

Parameters

 

customCap

[in] Pointer to a CustomLineCap object.

capType

[out] Pointer to a variable that receives the type of the CustomLineCap specified by customCap.

The CustomLineCapType enumeration (defined in GdiplusEnums.h) has two elements: CustomLineCapTypeDefault = 0 and CustomLineCapTypeAdjustableArrow = 1.

 

GdipGetCustomLineCapWidthScale

 

Description

Gets the value of the scale width. This is the amount to scale the custom line cap relative to the width of the Pen object used to draw a line. The default value of 1.0 does not scale the line cap.

Syntax

GpStatus WINGDIPAPI GdipGetCustomLineCapWidthScale(

    GpCustomLineCap* customCap,

    REAL* widthScale

);

PowerBASIC Syntax

DECLARE FUNCTION GdipGetCustomLineCapWidthScale ( _

    BYVAL customCap AS DWORD, _

    BYREF widthScale AS SINGLE _

) AS LONG

Parameters

 

customCap

[in] Pointer to a CustomLineCap object.

widthScale

[in] Pointer to a variable that receives the value of the width-scaling factor.

 

GdipSetCustomLineCapBaseCap

 

Description

Sets the LineCap that appears as part of this CustomLineCap at the end of a line.

Syntax

GpStatus WINGDIPAPI GdipSetCustomLineCapBaseCap(

    GpCustomLineCap* customCap,

    GpLineCap baseCap

);

PowerBASIC Syntax

DECLARE FUNCTION GdipSetCustomLineCapBaseCap ( _

    BYVAL customCap AS DWORD, _

    BYVAL baseCap AS LONG _

) AS LONG

Parameters

 

customCap

[in] Pointer to a CustomLineCap object.

baseCap

[in] Element of the LineCap enumeration that specifies the line cap used on the ends of the line to be drawn.

 

GdipsetCustomLineCapBaseInset

 

Description

Sets the base inset value of this custom line cap. This is the distance between the end of a line and the base cap.

Syntax

GpStatus WINGDIPAPI GdipSetCustomLineCapBaseInset(

    GpCustomLineCap* customCap,

    REAL inset

);

PowerBASIC Syntax

DECLARE FUNCTION GdipSetCustomLineCapBaseInset ( _

    BYVAL customCap AS DWORD, _

    BYVAL inset AS SINGLE _

) AS LONG

Parameters

 

customCap

[in] Pointer to a CustomLineCap object.

inset

[in] Single precision value that specifies the distance, in units, from the base cap to the start of the line. If this value is greater than the length of the line, the behavior of this method is undefined.

 

GdipSetCustomLineCapStrokeCaps

 

Description

Sets the LineCap objects used to start and end lines within the GraphicsPath object that defines this CustomLineCap object.

Syntax

GpStatus WINGDIPAPI GdipSetCustomLineCapStrokeCaps(

    GpCustomLineCap* customCap,

    GpLineCap startCap,

    GpLineCap endCap

);

PowerBASIC Syntax

DECLARE FUNCTION GdipSetCustomLineCapStrokeCaps ( _

    BYVAL customCap AS DWORD, _

    BYVAL startCap AS LONG, _

    BYVAL endCap AS LONG _

) AS LONG

Parameters

 

customCap

[in] Pointer to a CustomLineCap object.

startCap

[in] Element of the LineCap enumeration that specifies the line cap that will be used for the start of the line to be drawn.

endCap

[in] Element of the LineCap enumeration that specifies the line cap that will be used for the end of the line to be drawn.

 

GdipSetCustomLineCapStrokeJoin

 

Description

Sets the style of line join for the stroke. The line join specifies how two lines that intersect within the GraphicsPath object that makes up the custom line cap are joined.

Syntax

GpStatus WINGDIPAPI GdipSetCustomLineCapStrokeJoin(

    GpCustomLineCap* customCap,

    GpLineJoin lineJoin

);

PowerBASIC Syntax

DECLARE FUNCTION GdipSetCustomLineCapStrokeJoin ( _

    BYVAL customCap AS DWORD, _

    BYVAL lineJoin AS LONG _

) AS LONG

Parameters

 

customCap

[in] Pointer to a CustomLineCap object.

lineJoin

[in] Element of the LineJoin enumeration that specifies the line join that will be used for two lines that are drawn by the same pen and that have overlapping ends.

 

GdipSetCustomLineCapWidthScale

 

Description

Sets the value of the scale width. This is the amount to scale the custom line cap relative to the width of the Pen used to draw lines. The default value of 1.0 does not scale the line cap.

Syntax

GpStatus WINGDIPAPI GdipSetCustomLineCapWidthScale(

    GpCustomLineCap* customCap,

    REAL widthScale

);

PowerBASIC Syntax

DECLARE FUNCTION GdipSetCustomLineCapWidthScale ( _

    BYVAL customCap AS DWORD, _

    BYVAL widthScale AS SINGLE _

) AS LONG

Parameters

 

customCap

[in] Pointer to a CustomLineCap object.

widthScale

[in] Single precision value that specifies the scaling factor that will be used to scale the line width.

 

Page last updated on Monday, 11 December 2006 11:11:43 +0100