PTX(3g) — Subroutines
Name
PTX − Writes and positions a character string (2D form).
Operating States: PHOP, ∗, STOP, ∗
PHIGS standard function
Creates a structure element
Syntax
PTX (PX, PY, CHARS)
Argument Data Type Access Description
---------------------------------------------------------------------------
PX, PY Real Read Text position, in modeling
coordinates
CHARS Character ∗(∗) Read Text string
---------------------------------------------------------------------------
Description
PTX writes a character string and positions it for display according to the text point specified in modeling coordinate units. Associated text attributes, normalization transformation, and the capabilities of the workstation also affect the appearance of the string.
Depending on the current edit mode, this function either inserts the new structure element directly after the element indicated by the pointer or replaces the element indicated by the pointer. The pointer then points to the new text element.
The PTX function specifies the two-dimensional (x and y) form of the text primitive. Its z-coordinate is set to 0. A call to this function has the following effects during structure traversal:
•Digital PHIGS generates a character string in the text position on a text plane.
The text plane and the local coordinate system, in which all geometric text attributes are measured on that plane, are defined by a point and two vectors contained in the definition of the primitive. This point is the text position. The two vectors are the first direction vector and the second direction vector. To illustrate the use of the local coordinate system, assume the following:
•P is the text position.
•U and V are the first and second text direction vectors.
•T is a vector perpendicular to U and in the text plane.
The text plane is the plane that contains P and is perpendicular to UxV. The origin of the local coordinate system is at the point P. The positive x-axis of the local coordinate system is parallel to U. If the dot product of TxV is positive, the positive y-axis is parallel to T. Otherwise, the positive y-axis is opposite T.
•Digital PHIGS binds the current values of the text attributes, as defined in the PHIGS traversal state list, to the text primitive.
The text precision attribute affects text clipping.
If Digital PHIGS is in immediate mode, it performs this function immediately, but the function does not create a structure element.
See Also
PADS
PQTXX
PQTXF
PRES
PSCHXP
PSCHH
PSCHSP
PSCHUP
PSDCI
PSHRID
PSIASF
PSPKID
PSTXAL
PSTXC
PSTXCI
PSTXFN
PSTXI
PSTXP
PSTXPR
PSVWI
PTX3