-+-+-+-+-+-+-+-+ START OF PART 216 -+-+-+-+-+-+-+-+
X** \param`7BPint *`7D`7Berror`7D`7Berror indicator`7D`7BOUT`7D
X** \param`7BPchar **`7D`7Bdatabuf`7D`7Bdata buffer`7D`7BOUT`7D
X** \param`7Bptkselcontent *`7D`7Belcontent`7D`7Belement content data record`
V7D`7BOUT`7D
X** \paramend`20
X** \blurb`7BThis function may be used to obtain the type, size and
X** contents of element `7B\tt elemid`7D in structure `7B\tt stid`7D.`20
X** The data buffer is used to store
X** the element contents data and is allocated by the function. The
X** buffer should be deallocated by the application when the element
X** data is no longer required. This function works with both SunPHIGS
X** and DEC PHIGS.`7D
X*/
X`7B
X#ifdef VMS
X  Pelsize size;
X#endif
X#ifdef SUN
X  Pint size;
X#endif
X  Pint bufsize;
X
X  pinqelemtypesize(stid, elemid, error, &elcontent->eltype, &size);
X  if (*error != 0)
X    return;
X  else
X  `7B
X#ifdef SUN
X    bufsize = size;
X    *databuf = (Pchar *)malloc(bufsize);
X    pinqelemcontent(stid, elemid, bufsize, error, *databuf,`20
X                    &elcontent->size, &elcontent->eldata);
X#endif
X#ifdef VMS
X    switch (elcontent->eltype)
X    `7B
X      case PEL_POLYLINE3:
X      case PEL_POLYMARKER3:
X      case PEL_FILL_AREA3:
X        bufsize = size.number * sizeof(Ppoint3);
X        *databuf = (Pchar *)calloc(bufsize, sizeof(Pchar));
X        pinqelemcontent(stid, elemid, bufsize, error, *databuf,`20
X                       &elcontent->size, &elcontent->eldata);
X        elcontent->size = size.number;
X        break;
X `20
X      case PEL_POLYLINE:
X      case PEL_POLYMARKER:
X      case PEL_FILL_AREA:
X        bufsize = size.number * sizeof(Ppoint);
X        *databuf = (Pchar *)calloc(bufsize, sizeof(Pchar));
X        pinqelemcontent(stid, elemid, bufsize, error, *databuf,`20
X                        &elcontent->size, &elcontent->eldata);
X        elcontent->size = size.number;
X        break;
X `20
X      case PEL_FILL_AREA_SET3:
X        bufsize = size.fas_size.total_pts * sizeof(Ppoint3);
X        bufsize += size.fas_size.num_bounds * sizeof(Pint);
X        *databuf = (Pchar *)calloc(bufsize, sizeof(Pchar));
X        pinqelemcontent(stid, elemid, bufsize, error, *databuf,`20
X                        &elcontent->size, &elcontent->eldata);
X        elcontent->size = size.fas_size.num_bounds;
X        break;
X `20
X      case PEL_FILL_AREA_SET:
X        bufsize = size.fas_size.total_pts * sizeof(Ppoint);
X        bufsize += size.fas_size.num_bounds * sizeof(Pint);
X        *databuf = (Pchar *)calloc(bufsize, sizeof(Pchar));
X        pinqelemcontent(stid, elemid, bufsize, error, *databuf,`20
X                        &elcontent->size, &elcontent->eldata);
X        elcontent->size = size.fas_size.num_bounds;
X        break;
X
X      case PEL_ADD_NAMES_TO_SET:
X      case PEL_REMOVE_NAMES_FROM_SET:
X        bufsize = size.number * sizeof(Pint);
X        *databuf = (Pchar *)calloc(bufsize, sizeof(Pchar));
X        pinqelemcontent(stid, elemid, bufsize, error, *databuf,`20
X                        &elcontent->size, &elcontent->eldata);
X        break;
X `20
X      default:
X        bufsize = size.number;
X        *databuf = (Pchar *)malloc(bufsize);
X        pinqelemcontent(stid, elemid, bufsize, error, *databuf,`20
X                        &elcontent->size, &elcontent->eldata);
X        break;
X    `7D
X#endif
X  `7D
X`7D  /* ptk_inqelemtypesizecontent */
X
X/*--------------------------------------------------------------------------
V*/
X
X/*function:external*/
Xextern void ptk_inqelemtype(C(Pint) stid, C(Pint) elemid, C(Pint *) error,`2
V0
X                            C(Peltype *) eltype)
XPreANSI(Pint stid)
XPreANSI(Pint elemid)
XPreANSI(Pint *error)
XPreANSI(Peltype *eltype)
X/*
X** \parambegin
X** \param`7BPint`7D`7Bstid`7D`7Bstructure identifier`7D`7BIN`7D
X** \param`7BPint`7D`7Belemid`7D`7Belement number`7D`7BIN`7D
X** \param`7BPint *`7D`7Berror`7D`7Berror indicator`7D`7BOUT`7D
X** \param`7BPeltype *`7D`7Beltype`7D`7Belement type`7D`7BOUT`7D
X** \paramend`20
X** \blurb`7BThis function may be used to obtain the element type of
X** element `7B\tt elemid`7D in structure `7B\tt stid`7D
X** and works for both SunPHIGS and DEC PHIGS.`7D
X*/
X`7B
X#ifdef VMS
X  Pelsize size;
X#endif
X#ifdef SUN
X  Pint size;
X#endif
X
X  pinqelemtypesize(stid, elemid, error, eltype, &size);
X`7D  /* ptk_inqelemtype */
X
X/*--------------------------------------------------------------------------
V*/
X
X/*function:external*/
Xextern void ptk_inqtextextent(C(Pwstype) wstype, C(Pint) font,`20
X            C(Pfloat) chexp, C(Pfloat) chsp, C(Pfloat) chht,`20
X            C(Ptxpath) txpath, C(Ptxhor) txhor, C(Ptxver) txver,
X            C(Pchar *) str, C(Pint *) errind, C(Prect *) rect,
X            C(Ppoint *) offset)
XPreANSI(Pwstype wstype)
XPreANSI(Pint font)`20
XPreANSI(Pfloat chexp)
XPreANSI(Pfloat chsp)
XPreANSI(Pfloat chht)
XPreANSI(Ptxpath txpath)
XPreANSI(Ptxhor txhor)
XPreANSI(Ptxver txver)
XPreANSI(Pchar *str)
XPreANSI(Pint *errind)
XPreANSI(Prect *rect)
XPreANSI(Ppoint *offset)
X/*
X** \parambegin
X** \param`7BPwstype`7D`7Bwstype`7D`7Bworkstation type`7D`7BIN`7D
X** \param`7BPint`7D`7Bfont`7D`7Btext font`7D`7BIN`7D
X** \param`7BPfloat`7D`7Bchexp`7D`7Bcharacter expansion factor`7D`7BIN`7D
X** \param`7BPfloat`7D`7Bchsp`7D`7Bcharacter spacing`7D`7BIN`7D
X** \param`7BPfloat`7D`7Bchht`7D`7Bcharacter height`7D`7BIN`7D
X** \param`7BPtxpath`7D`7Btxpath`7D`7Btext path`7D`7BIN`7D
X** \param`7BPtxhor`7D`7Btxhor`7D`7Bhorizontal text alignment`7D`7BIN`7D
X** \param`7BPtxver`7D`7Btxver`7D`7Bvertical text alignment`7D`7BIN`7D
X** \param`7BPchar *`7D`7Bstr`7D`7Bcharacter string`7D`7BIN`7D
X** \param`7BPint *`7D`7Berrind`7D`7Berror indicator`7D`7BOUT`7D
X** \param`7BPrect *`7D`7Brect`7D`7Btext bounding rectangle`7D`7BOUT`7D
X** \param`7BPpoint *`7D`7Boffset`7D`7Bconcatenation offset`7D`7BOUT`7D
X** \paramend`20
X** \blurb`7BThis function may be used to obtain the bounding rectangle
X** of a text element in Text Local Coordinates
X** and works for both SunPHIGS and DEC PHIGS.`7D
X*/
X`7B
X#ifdef SUN
X  pinqtextextent(wstype, font, chexp, chsp, chht, txpath, txhor, txver,
X                 str, errind, rect, offset);
X#endif
X#ifdef VMS
X  Pfloat vrect`5B4`5D;
X  Pfloat voffset`5B2`5D;
X
X  pinqtextextent(wstype, font, chexp, chsp, chht, txpath, txhor, txver,
X                 str, errind, vrect, voffset);
X  (*rect).ll.x = vrect`5B0`5D;
X  (*rect).ur.x = vrect`5B1`5D;
X  (*rect).ll.y = vrect`5B2`5D;
X  (*rect).ur.y = vrect`5B3`5D;
X  (*offset).x = voffset`5B0`5D;
X  (*offset).y = voffset`5B1`5D;
X#endif
X`7D  /* ptk_inqtextextent */
X
X/*--------------------------------------------------------------------------
V*/
X
X/*function:external*/
Xextern void ptk_pscale(C(Ppoint *) scalept, C(Pint *) err, C(Pmatrix) mat)
XPreANSI(Ppoint *scalept)
XPreANSI(Pint *err)
XPreANSI(Pmatrix mat)
X/*
X** \parambegin
X** \param`7BPpoint *`7D`7Bscalept`7D`7Bscale vector`7D`7BIN`7D
X** \param`7BPint *`7D`7Berr`7D`7Berror indicator`7D`7BOUT`7D
X** \param`7BPmatrix`7D`7Bmat`7D`7B3x3 matrix`7D`7BOUT`7D
X** \paramend
X** \blurb`7BThis function performs the SCALE function using a `7B\tt Ppoint`
V7D
X** datatype instead of `7B\tt Pvector`7D.`7D
X*/
X`7B
X  Pvector vec;
X `20
X  vec = ptk_vector(scalept->x, scalept->y);
X  pscale(&vec, err, mat);
X`7D  /* ptk_pscale */
X
X/*--------------------------------------------------------------------------
V*/
X
X/*function:external*/
Xextern void ptk_pscale3(C(Ppoint3 *) scalept, C(Pint *) err, C(Pmatrix3) mat
V)
XPreANSI(Ppoint3 *scalept)
XPreANSI(Pint *err)
XPreANSI(Pmatrix3 mat)
X/*
X** \parambegin
X** \param`7BPpoint3 *`7D`7Bscalept`7D`7Bscale vector`7D`7BIN`7D
X** \param`7BPint *`7D`7Berr`7D`7Berror indicator`7D`7BOUT`7D
X** \param`7BPmatrix3`7D`7Bmat`7D`7B4x4 matrix`7D`7BOUT`7D
X** \paramend
X** \blurb`7BThis function performs the SCALE3 function using a `7B\tt Ppoint
V3`7D
X** datatype instead of `7B\tt Pvector3`7D.`7D
X*/
X`7B
X  Pvector3 vec;
X `20
X  vec = ptk_vector3(scalept->x, scalept->y, scalept->z);
X  pscale3(&vec, err, mat);
X`7D  /* ptk_pscale3 */
X
X/*--------------------------------------------------------------------------
V*/
X
X/*function:external*/
Xextern void ptk_psetcharup(C(Ppoint *) pt)
XPreANSI(Ppoint *pt)
X/*
X** \parambegin
X** \param`7BPpoint *`7D`7Bpt`7D`7Bcharacter up vector`7D`7BIN`7D
X** \paramend
X** \blurb`7BThis function performs the SET CHARACTER UP VECTOR function`20
X** using a `7B\tt Ppoint`7D datatype instead of `7B\tt Pvector`7D.`7D
X*/
X`7B
X  Pvector vec;
X `20
X  vec = ptk_vector(pt->x, pt->y);
X  psetcharup(&vec);
X`7D  /* ptk_psetcharup */
X
X/*--------------------------------------------------------------------------
V*/
X
X/*function:external*/
Xextern void ptk_psetannotationcharup(C(Ppoint *) pt)
XPreANSI(Ppoint *pt)
X/*
X** \parambegin
X** \param`7BPpoint *`7D`7Bpt`7D`7Bannotation character up vector`7D`7BIN`7D
X** \paramend
X** \blurb`7BThis function performs the SET ANNOTATION CHARACTER UP VECTOR`20
X** function using a `7B\tt Ppoint`7D datatype instead of `7B\tt Pvector`7D.`
V7D
X*/
X`7B
X  Pvector vec;
X `20
X  vec = ptk_vector(pt->x, pt->y);
X  psetannotationcharup(&vec);
X`7D  /* ptk_psetannotationcharup */
X
X/*--------------------------------------------------------------------------
V*/
X
X/*function:external*/
Xextern void ptk_ptranslate(C(Ppoint *) tranpt, C(Pint *) err, C(Pmatrix) mat
V)
XPreANSI(Ppoint *tranpt)
XPreANSI(Pint *err)
XPreANSI(Pmatrix mat)
X/*
X** \parambegin
X** \param`7BPpoint *`7D`7Btranpt`7D`7Btranslation vector`7D`7BIN`7D
X** \param`7BPint *`7D`7Berr`7D`7Berror indicator`7D`7BOUT`7D
X** \param`7BPmatrix`7D`7Bmat`7D`7B3x3 matrix`7D`7BOUT`7D
X** \paramend
X** \blurb`7BThis function performs the TRANSLATE function using a `7B\tt Ppo
Vint`7D
X** datatype instead of `7B\tt Pvector`7D.`7D
X*/
X`7B
X  Pvector vec;
X `20
X  vec = ptk_vector(tranpt->x, tranpt->y);
X  ptranslate(&vec, err, mat);
X`7D  /* ptk_ptranslate */
X
X/*--------------------------------------------------------------------------
V*/
X
X/*function:external*/
Xextern void ptk_ptranslate3(C(Ppoint3 *) tranpt, C(Pint *) err,
X                            C(Pmatrix3) mat)
XPreANSI(Ppoint3 *tranpt)
XPreANSI(Pint *err)
XPreANSI(Pmatrix3 mat)
X/*
X** \parambegin
X** \param`7BPpoint3 *`7D`7Btranpt`7D`7Btranslation vector`7D`7BIN`7D
X** \param`7BPint *`7D`7Berr`7D`7Berror indicator`7D`7BOUT`7D
X** \param`7BPmatrix3`7D`7Bmat`7D`7B4x4 matrix`7D`7BOUT`7D
X** \paramend
X** \blurb`7BThis function performs the TRANSLATE3 function using a `7B\tt Pp
Voint3`7D
X** datatype instead of `7B\tt Pvector3`7D.`7D
X*/
X`7B
X  Pvector3 vec;
X `20
X  vec = ptk_vector3(tranpt->x, tranpt->y, tranpt->z);
X  ptranslate3(&vec, err, mat);
X`7D  /* ptk_ptranslate3 */
X
X/*--------------------------------------------------------------------------
V*/
X
X/*function:external*/
Xextern void ptk_pbuildtran(C(Ppoint *) pt, C(Ppoint *) shift,`20
X                           C(Pfloat) angle, C(Ppoint *) scale,
X                           C(Pint *) err, C(Pmatrix) mat)
XPreANSI(Ppoint *pt)
XPreANSI(Ppoint *shift)
XPreANSI(Pfloat angle)
XPreANSI(Ppoint *scale)
XPreANSI(Pint *err)
XPreANSI(Pmatrix mat)
X/*
X** \parambegin
X** \param`7BPpoint *`7D`7Bpt`7D`7Bfixed point`7D`7BIN`7D
X** \param`7BPpoint *`7D`7Bshift`7D`7Bshift vector`7D`7BIN`7D
X** \param`7BPfloat`7D`7Bangle`7D`7Brotation angle`7D`7BIN`7D
X** \param`7BPpoint *`7D`7Bscale`7D`7Bscale vector`7D`7BIN`7D
X** \param`7BPint *`7D`7Berr`7D`7Berror indicator`7D`7BOUT`7D
X** \param`7BPmatrix`7D`7Bmat`7D`7B3x3 matrix`7D`7BOUT`7D
X** \paramend
X** \blurb`7BThis function performs the BUILD TRANSFORMATION MATRIX
X** function using the `7B\tt Ppoint`7D datatype instead of `7B\tt Pvector`7D
V.`7D
X*/
X`7B
X  Pvector vec1, vec2;
X `20
X  vec1 = ptk_vector(shift->x, shift->y);
X  vec2 = ptk_vector(scale->x, scale->y);
X  pbuildtran(pt, &vec1, angle, &vec2, err, mat);
X`7D  /* ptk_pbuildtran */
X
X/*--------------------------------------------------------------------------
V*/
X
X/*function:external*/
Xextern void ptk_pbuildtran3(C(Ppoint3 *) pt, C(Ppoint3 *) shift,`20
X      C(Pfloat) xangle, C(Pfloat) yangle, C(Pfloat) zangle,`20
X      C(Ppoint3 *) scale, C(Pint *) err, C(Pmatrix3) mat)
XPreANSI(Ppoint3 *pt)
XPreANSI(Ppoint3 *shift)
XPreANSI(Pfloat xangle)
XPreANSI(Pfloat yangle)
XPreANSI(Pfloat zangle)
XPreANSI(Ppoint3 *scale)
XPreANSI(Pint *err)
XPreANSI(Pmatrix3 mat)
X/*
X** \parambegin
X** \param`7BPpoint3 *`7D`7Bpt`7D`7Bfixed point`7D`7BIN`7D
X** \param`7BPpoint3 *`7D`7Bshift`7D`7Bshift vector`7D`7BIN`7D
X** \param`7BPfloat`7D`7Bxangle`7D`7Bx rotation angle`7D`7BIN`7D
X** \param`7BPfloat`7D`7Byangle`7D`7By rotation angle`7D`7BIN`7D
X** \param`7BPfloat`7D`7Bzangle`7D`7Bz rotation angle`7D`7BIN`7D
X** \param`7BPpoint3 *`7D`7Bscale`7D`7Bscale vector`7D`7BIN`7D
X** \param`7BPint *`7D`7Berr`7D`7Berror indicator`7D`7BOUT`7D
X** \param`7BPmatrix3`7D`7Bmat`7D`7B4x4 matrix`7D`7BOUT`7D
X** \paramend
X** \blurb`7BThis function performs the BUILD TRANSFORMATION MATRIX3
X** function using the `7B\tt Ppoint3`7D datatype instead of `7B\tt Pvector3`
V7D.`7D
X*/
X`7B
X  Pvector3 vec1, vec2;
X `20
X  vec1 = ptk_vector3(shift->x, shift->y, shift->z);
X  vec2 = ptk_vector3(scale->x, scale->y, scale->z);
X  pbuildtran(pt, &vec1, xangle, yangle, zangle, &vec2, err, mat);
X`7D  /* ptk_pbuildtran3 */
X
X/*--------------------------------------------------------------------------
V*/
X
X/*function:external*/
Xextern void ptk_pcomposetran(C(Pmatrix) mat, C(Ppoint *) pt,`20
X                 C(Ppoint *) shift, C(Pfloat) angle, C(Ppoint *) scale,
X                 C(Pint *) err, C(Pmatrix) result)
XPreANSI(Pmatrix mat)
XPreANSI(Ppoint *pt)
XPreANSI(Ppoint *shift)
XPreANSI(Pfloat angle)
XPreANSI(Ppoint *scale)
XPreANSI(Pint *err)
XPreANSI(Pmatrix result)
X/*
X** \parambegin
X** \param`7BPmatrix`7D`7Bmat`7D`7B3x3 matrix`7D`7BIN`7D
X** \param`7BPpoint *`7D`7Bpt`7D`7Bfixed point`7D`7BIN`7D
X** \param`7BPpoint *`7D`7Bshift`7D`7Bshift vector`7D`7BIN`7D
X** \param`7BPfloat`7D`7Bangle`7D`7Brotation angle`7D`7BIN`7D
X** \param`7BPpoint *`7D`7Bscale`7D`7Bscale vector`7D`7BIN`7D
X** \param`7BPint *`7D`7Berr`7D`7Berror indicator`7D`7BOUT`7D
X** \param`7BPmatrix`7D`7Bresult`7D`7B3x3 matrix`7D`7BOUT`7D
X** \paramend
X** \blurb`7BThis function performs the COMPOSE TRANSFORMATION MATRIX
+-+-+-+-+-+-+-+-  END  OF PART 216 +-+-+-+-+-+-+-+-