|
|
DataMuseum.dkPresents historical artifacts from the history of: ICL Comet 32 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about ICL Comet 32 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 2001 (0x7d1)
Types: TextFile
Notes: UNIX file
Names: »inqu2.c«
└─⟦26887b7e0⟧ Bits:30009717 Comet 32 harddisk image
└─⟦28c352965⟧ »/a« UNIX Filesystem
└─⟦this⟧ »usr/src/gks/gks/inqu2.c«
#if INQU > 0
#include "../h/gks.h"
#include "../h/gksi.h"
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* textext - INQUIRE TEXT EXTENT.
*
* Input - wsi = workstation identifier.
* pt = text position in WC.
* st = character string.
* gks.curntr = current normalization transformation.
*
* Process - The extent of the specified character string is computed
* using the current text attributes character height,
* character up vector, and text alignment.
*
* The concatenation point can be used as the origin of a
* subsequent TEXT output primitive for the concatenation
* of character strings.
*
* The offset of the concatenation point from the text
* starting point is the character string width plus one
* additional character spacing.
*
* The text extent rectangle points define the rectangle
* which completely encloses the character bodies of the
* string.
*
* Output - Returns FALSE if error condition.
* cat = concatenation point.
* tr = text extent rectangle.
* ws = current workstation state table.
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
Bool
textext(wsi,pt,st,cat,tr)
Wsi wsi;
Wc *pt;
String st;
Wc *cat;
Wrect *tr;
{ Nc q;
/* Convert position from WC to NDC.*/
ntransf(pt, &q);
ws = (Wss *)wsi;
(*ws->ws_wsd->wd_func.ite)(&q, st, cat, tr);
/* Convert back to world coordinates.*/
cat->w_x = (cat->w_x - gks.curntr.xa)/gks.curntr.xm;
cat->w_y = (cat->w_y - gks.curntr.ya)/gks.curntr.ym;
tr->w_ll.w_x = (tr->w_ll.w_x - gks.curntr.xa)/gks.curntr.xm;
tr->w_ll.w_y = (tr->w_ll.w_y - gks.curntr.ya)/gks.curntr.ym;
tr->w_ur.w_x = (tr->w_ur.w_x - gks.curntr.xa)/gks.curntr.xm;
tr->w_ur.w_y = (tr->w_ur.w_y - gks.curntr.ya)/gks.curntr.ym;
return (TRUE);
}
# endif