GENERALIZED DRAWING PRIMITIVE(3P) — SUNPHIGS LIBRARY
NAME
GENERALIZED DRAWING PRIMITIVE − create 2D GDP elements such as polyline set, circle, or ellipse
SYNOPSIS
C Syntax
void
pgdp ( num_points, points, gdp_id, gdp_data )
Pintnum_points;number of points
Ppoint∗points;array of points
Pintgdp_id;gdp function identifier
Pgdprec∗gdp_data;data record pointer
FORTRAN Syntax
SUBROUTINE pgdp ( N, PXA, PYA, PRIMID, LDR, DATREC )
INTEGERNnumber of points (>= 0)
REALPXA(∗), PYA(∗)coordinates of points (MC)
INTEGERPRIMIDGDP identifier
INTEGERLDRdimension of data record array
CHARACTER∗80DATREC(LDR) data record
Required PHIGS Operating States
(PHOP, ∗, STOP, ∗)
DESCRIPTION
Purpose
GENERALIZED DRAWING PRIMITIVE creates the following GDP structure elements:
• polyline set
• circle
• circular arc
• circular arc close
• annotation circle
• annotation circular arc
• annotation circular arc close
• ellipse
• elliptical arc
• elliptical arc close
• annotation ellipse
• annotation elliptical arc
• annotation elliptical arc close
If the current edit mode is INSERT, the structure element created by the GENERALIZED DRAWING PRIMITIVE function is inserted into the open structure after the element pointed to by the element pointer. If the current edit mode is REPLACE, the GENERALIZED DRAWING PRIMITIVE element replaces the element pointed to by the element pointer. In either case, the element pointer is updated to point to the new structure element.
Support for GDPs is implementation and workstation dependent. The current SunPHIGS GDPs are implemented on all supported workstations.
Each generalized drawing primitive has its own page in the reference manual. The name of the page is generalized drawing primitive-xx, where xx is replaced by the GDP identifiers; for example, GENERALIZED DRAWING PRIMITIVE -1.
C Input Parameters
num_points
Number of points passed in the points parameter.
pointsA pointer to a list num_points long of Ppoint structures containing x and y values in Modelling Coordinates (MC). Ppoint is defined in phigs.h as:
typedef struct {
Pfloatx;/∗ x coordinate ∗/
Pfloaty;/∗ y coordinate ∗/
} Ppoint;
gdp_id
An integer specifying the GENERALIZED DRAWING PRIMITIVE to be performed. Predefined values defined in phigs.h are:
-1PUGDP_POLYLINE_SETPolyline Set
-2PUGDP_CIRCLECircle
-3PUGDP_CIRC_ARCCircular Arc
-4PUGDP_CIRC_ARC_CLOSECircular Arc Close
-5PUGDP_ANNOT_CIRCLEAnnotation Circle
-6PUGDP_ANNOT_CIRC_ARCAnnotation Circular Arc
-7PUGDP_ANNOT_CIRC_ARC_CLOSEAnnotation Circular Arc Close
-8PUGDP_ELLIPSEEllipse
-9PUGDP_ELLP_ARCElliptical Arc
-10PUGDP_ELLP_ARC_CLOSEElliptical Arc Close
-11PUGDP_ANNOT_ELLIPSEAnnotation Ellipse
-12PUGDP_ANNOT_ELLP_ARCAnnotation Elliptical Arc
-13PUGDP_ANNOT_ELLP_ARC_CLOSEAnnotation Elliptical Arc Close
gdp_data
A pointer to a Pgdprec union containing the information needed to perform the function specified by gdp_id. Pgdprec is defined in phigs.h as:
typedef union {
Pgdp0001recgdp1_datarec;/∗ GDP1 data record ∗/
Pdataunsupported;/∗ unsupported GDP data record ∗/
/∗ implementation defined GDP’s ∗/
Pugdp0001recugdp1_datarec;/∗ Polyline Set ∗/
Pugdp0002recugdp2_datarec;/∗ Circle ∗/
Pugdp0003recugdp3_datarec;/∗ Circular Arc ∗/
Pugdp0004recugdp4_datarec;/∗ Circular Arc Close ∗/
Pugdp0005recugdp5_datarec;/∗ Annotation Circle ∗/
Pugdp0006recugdp6_datarec;/∗ Annotation Circular Arc ∗/
Pugdp0007recugdp7_datarec;/∗ Annotation Circular Arc Close ∗/
Pugdp0008recugdp8_datarec;/∗ Ellipse ∗/
Pugdp0009recugdp9_datarec;/∗ Elliptical Arc ∗/
Pugdp0010recugdp10_datarec;/∗ Elliptical Arc Close ∗/
Pugdp0011recugdp11_datarec;/∗ Annotation Ellipse ∗/
Pugdp0012recugdp12_datarec;/∗ Annotation Elliptical Arc ∗/
Pugdp0013recugdp13_datarec;/∗ Annotation Elliptical Arc Close ∗/
} Pgdprec;
FORTRAN Input Parameters
NNumber of points passed in the PXA and PYA arrays.
PXAAn array of N real values containing x coordinates in MC.
PYAAn array of N real values containing y coordinates in MC.
PRIMID
An integer specifying the GENERALIZED DRAWING PRIMITIVE to be performed. Predefined values defined in phigs77.h are:
-1PUGDPPLSPolyline Set
-2PUGDPCIRCCircle
-3PUGDPCIRCARCCircular Arc
-4PUGDPCIRCARCCLCircular Arc Close
-5PUGDPACIRCAnnotation Circle
-6PUGDPACIRCARCAnnotation Circular Arc
-7PUGDPACIRCARCCLAnnotation Circular Arc Close
-8PUGDPELLPEllipse
-9PUGDPELLPARCElliptical Arc
-10PUGDPELLPARCCLElliptical Arc Close
-11PUGDPAELLPAnnotation Ellipse
-12PUGDPAELLPARCAnnotation Elliptical Arc
-13PUGDPAELLPARCCLAnnotation Elliptical Arc Close
LDRThe dimension of DATREC (returned by the PACK DATA RECORD subroutine).
DATREC
A GDP data record packed by the PACK DATA RECORD subroutine containing the information needed to perform the function specified by PRIMID.
ERRORS
005Ignoring function, function requires state (PHOP, ∗, STOP, ∗)
SEE ALSO
PACK DATA RECORD (3P)
GENERALIZED DRAWING PRIMITIVE -1 (3P)
GENERALIZED DRAWING PRIMITIVE -2 (3P)
GENERALIZED DRAWING PRIMITIVE -3 (3P)
GENERALIZED DRAWING PRIMITIVE -4 (3P)
GENERALIZED DRAWING PRIMITIVE -5 (3P)
GENERALIZED DRAWING PRIMITIVE -6 (3P)
GENERALIZED DRAWING PRIMITIVE -7 (3P)
GENERALIZED DRAWING PRIMITIVE -8 (3P)
GENERALIZED DRAWING PRIMITIVE -9 (3P)
GENERALIZED DRAWING PRIMITIVE -10 (3P)
GENERALIZED DRAWING PRIMITIVE -11 (3P)
GENERALIZED DRAWING PRIMITIVE -12 (3P)
GENERALIZED DRAWING PRIMITIVE -13 (3P)
GENERALIZED DRAWING PRIMITIVE 3 (3P)
Sun Release 4.0 — Last change: 29 July 1989