PEXOCCSetPolylineInterpMethod - Set Polyline Interpolation Method (5.0)


Synopsis

 
   void PEXOCCSetPolylineInterpMethod(
        PEXOCC context,
        int method
   )
 
 
   void PEXSetPolylineInterpMethod(
        Display *display,
        XID resource_id,
        PEXOCRequestType req_type,
        int method
   )
 

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).

method
The polyline interpolation method (PEXPolylineInterpNone or PEXPolylineInterpColor).

Returns

None.

Description

Invoke PEXOCCSetPolylineInterpMethod to create an attribute output command which sets the polyline interpolation method attribute in the renderer's pipeline state according to the value specified by method.

By setting the polyline interpolation method attribute's ASF to PEXIndividual (see PEXOCCSetIndividualASF), you use the pipeline state's polyline interpolation method entry to specify how color values are computed along the segments when rendering polyline primitives. The interpolation method applies to all components of color, including alpha. When you set the polyline interpolation method attribute's ASF to PEXBundled, the implementation uses the polyline interpolation method from the line bundle table.

PEXlib defines the following polyline interpolation methods (method):

PEXPolylineInterpNone -
does not perform interpolation between polyline vertices. If you supply color values that differ for the endpoints of a polyline segment, then it is implementation-dependent whether the color of the ith vertex is used to draw the line between the ith and (i+1)th vertices (if n is the number of vertices, the color at the nth vertex is ignored), or whether they are used to compute an average color which are applied to the entire segment. (5.0)

PEXPolylineInterpColor -
uses the polyline's vertex colors, if present. Then computes the color values along each polyline segment by linearly interpolating between the color values at the vertices. (5.0)

If the implementation does not support the specified interpolation method, then the method defaults to PEXPolylineInterpNone. Inquire the supported values for the polyline interpolation method by invoking the PEXGetEnumTypeInfo function.

This function is a member of the shaded 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.