PEXOCCSetLineCapStyle - Set Line Cap Style (5.2)


Synopsis

 
   void PEXOCCSetLineCapStyle(
        PEXOCC context,
        unsigned long cap_style
   )
 

Arguments

context
An OC context returned by a successful PEXCreateOCC call.

display (OCC)
A pointer to a display structure returned by a successful XOpenDisplay call.

resource_id (OCC)
The resource identifier of the renderer or structure.

req_type (OCC)
The request type for the output command (PEXOCRender, PEXOCStore, PEXOCRenderSingle or PEXOCStoreSingle).

cap_style
The desired cap style (PEXLineCapButt, PEXLineCapRound, or PEXLineCapProject).

Returns

None.

Description

Invoke PEXOCCSetLineCapStyle to set the line cap style entry of the renderer's pipeline state according to the value specified by cap_style.

By setting the line cap style attribute's ASF to PEXIndividual (see PEXOCCSetIndividualASF), you use the pipeline state's line cap style entry to provide control over how the implementation renders the ends of a wide line.When you set the line cap style attribute's ASF to PEXBundled, the implementation uses the line cap style from the line bundle table.

PEXlib defines the following cap styles (cap_style)

PEXLineCapButt -
The wide line is square at the endpoint (perpendicular to the slope of the line) with no projection beyond. (5.2)

PEXLineCapRound -
The wide line has a circular arc with the diameter equal to the linewidth, centered on the endpoint. (5.2)

PEXLineCapProject -
The wide line is square at the end, but the path continues beyond the endpoint for a distance equal to half the linewidth. (5.2)

If the implementation does not support the specified line cap style (cap_style), then the cap style defaults to PEXLineCapButt. Inquire the supported values for the line cap style by invoking the PEXGetEnumTypeInfo function

This function is a member of the line attribute set.

Errors

BadPEXRenderer
The specified renderer resource identifier is invalid.

BadPEXStructure
The specified structure resource identifier is invalid.

See Also

For an overview and for a list of output attribute functions, see Output Attribute Functions.