[ Previous |
Next |
Contents |
Glossary |
Home |
Search ]

*The graPHIGS Programming Interface : Subroutine Reference*

## GPCAC - Set Curve Approximation Criteria

**Purpose**

Use
**GPCAC** to insert a Set Curve Approximation
Criteria structure element into the open structure following
the element pointer or to replace the element pointed at by
the element pointer with a Set Curve Approximation Criteria
structure element depending on the current edit mode.

During structure traversal, this structure element
determines how the graPHIGS API tessellates curves for subsequent
curve primitives.
*Tessellation* is the dividing of curves into a
set of line geometries before they are processed.

Depending on the criteria selected, the graPHIGS API uses the
control value by itself or the control value in conjunction
with the tessellation vector in the curve primitive
definition, to determine how curves will be tessellated.

The traversal default for curve approximation criteria is
`1=WORKSTATION_DEPENDENT`
and a control value of
1.0.

If the workstation does not support the specified curve
approximation criteria or if the criteria value is outside
the allowable range, then the criteria defaults to
`1=WORKSTATION_DEPENDENT`
and the control value
defaults to 1.0

**Parameters**

*criteria* -- specified by user, fullword integer
Curve approximation criteria
(`1=WORKSTATION_DEPENDENT, 3=CONSTANT_SUBDIVISION_BETWEEN_KNOTS, 8=VARIABLE_SUBDIVISION_BETWEEN_KNOTS`
)
*value* -- specified by user,
short floating-point number
Control value (>=0)
Depending on the
*criteria* parameter values you
specified, control values are as follows:

**If
***criteria*=1
(`WORKSTATION_DEPENDENT`
)
A value of 1.0 specifies a nominal quality curve.
A value greater than or less than 1.0 specifies a higher or
lower quality curve respectively.
Whether or not the tessellation vector in the curve
definition is used is workstation dependent.
A nominal quality of 1 will typically correspond to a
chordal deviation of 1 pixel.
**If
***criteria*=3
(`CONSTANT_SUBDIVISION_BETWEEN_KNOTS`
)
This value is rounded off to the nearest integer and
specifies the fixed number of intervals to be used in
rendering the corresponding span of the curve.
If the tessellation vector is specified in the curve
definition, it is ignored.
**If
***criteria*=8
(`VARIABLE_SUBDIVISION_BETWEEN_KNOTS`
)
This value is multiplied by the tessellation vector in
the curve definition and rounded off to the nearest integer
in rendering the corresponding span of the curve.
If the tessellation vector in the curve definition is not
present, then the value is rounded off to the nearest
integer and this becomes the number of intervals to be used
in rendering the corresponding span of the curve (the
same as criteria 3)
**Error Codes**

**5**
- FUNCTION REQUIRES STATE STOP OR NROP (NOT STCL)
**65**
- CURVE APPROXIMATION CRITERIA IS INVALID
**66**
- CONTROL VALUE < ZERO

**Related Subroutines**

**GPQCDF**
- Inquire Curve Display Facilities

**RCP code**

201343235
(X'0C004103')

[ Previous |
Next |
Contents |
Glossary |
Home |
Search ]