/* * inc/chrfont.h * Declaracao de tipos para fontes de caracteres do GKS/puc * Microsoft C 5.0 - Turbo C 2.0 - VAX C 3.0 * Grupo de Tecnologia em Computacao Grafica - PUC/RIO * 21 Jul 92 */ typedef struct { Gtxpath path; Gtxhor alih; Gtxver aliv; Gfloat largu,lar1, alt,esp, top,cap,half,bottom,centre,right; Gsegtran r; } Roma; #ifdef __WATCOMC__ #define INT16 short #else #define INT16 int #endif #ifdef __NOSBF #define sbf(b,n) ((((signed INT16)(b) << ((8*sizeof(signed INT16))-n)) >> ((8*sizeof(signed INT16))-n))) #else #define sbf(b,n) ((signed INT16)(b)) #endif #define NUMCHAR 256 #define SIGNATURE "GKS/puc fonte 3.0\r\n" /* header de cada arquivo */ typedef struct { unsigned INT16 size:16; signed INT16 top:8; signed INT16 cap:8; signed INT16 half:8; signed INT16 bottom:8; } Gheader; /* elemento da access table */ typedef struct { signed INT16 width:8; signed INT16 centre:8; signed INT16 length:16; unsigned INT16 start:16; } Gaccess; /* elemento da definicao de um caracter */ typedef struct { unsigned INT16 op:2; signed INT16 x:7; signed INT16 y:7; } Grecord; typedef struct { char name[32]; char zero; } Gfontname; /* carrega fontes de caracteres */ Gerror _gks_puc_car_fonte ( Gtxfont fonnum, Grecord **fondef, Roma *tx, Gaccess **at ); /* Calcula a largura de uma string definida em fonte proporcional. */ Gfloat _gks_puc_tx_len ( Gchar *string, Gint nc , Gaccess *acc, Gint *imax ); /* descompacta movimentos do array de definicao */ void _gks_puc_descompac ( Grecord *fondef, Gchar asc, Gaccess *acc, Gchar *action, Gnpoint *def );