GSGTAT(3g,L) AIX Technical Reference GSGTAT(3g,L) ------------------------------------------------------------------------------- gsgtat PURPOSE Sets the attributes for the geometric text drawing functions. C SYNTAX int gsgtat_ (color, baseline, pre, expan, spac, height, upvectx, upvecty, alignhz, alignvt, font_ID, font) int *color, *baseline, *pre, *expan, *spac, *height, int *upvectx, *upvecty, *alignhz, *alignvt, *font_ID; char *font; FORTRAN SYNTAX INTEGER function gsgtat (color, baseline, pre, expan, spac, height, upvectx, upvecty, alignhz, alignvt, font_ID, font) INTEGER color, baseline, pre, expan, spac, height INTEGER upvectx, upvecty, alignhz, alignvt, font_ID CHARACTER*n font PASCAL SYNTAX FUNCTION gsgtat_ ( VAR color, baseline, pre, expan, spac, height: INTEGER; VAR upvectx, upvecty, alignhz, alignvt, font_ID: INTEGER; VAR font: ARRAY [0..k] of CHAR ): INTEGER [PUBLIC]; DESCRIPTION The gsgtat subroutine defines the attributes and fonts for the geometric text drawing functions. Note: The attributes defined by this command are applicable only to geometric text. Parameters color Specifies an entry in the color map for text color. If it is -1, the attribute is unchanged. baseline Determines the direction of the geometric text drawing. The valid values are: Processed November 7, 1990 GSGTAT(3g,L) 1 GSGTAT(3g,L) AIX Technical Reference GSGTAT(3g,L) -1 Attribute remains unchanged. 0 Specifies 0 degrees, or left to right in the viewer's terms. 1 Specifies 90 degrees, or up in the viewer's terms. 2 Specifies 180 degrees, or right to left in the viewer's terms. Note: The characters appear upside down. 3 Specifies 270 degrees, or down in the viewer's terms. Note: The baseline parameter does not change character rotation. Use the upvectx and upvecty parameters to rotate text. pre Specifies the desired text precision used in drawing text primitives. The valid values are: -1 Attribute remains unchanged. 1 Character precision. 2 Stroke precision. expan Defines as a 32-bit fractional integer the deviation of the width/height ratio of the character from the ratio defined in the font. The expansion factor only changes the width of the character. +-----------------------------------------------------------------------------+ | This figure cannot be displayed properly on the screen. | | Please refer to the printed book. | +-----------------------------------------------------------------------------+ In the above figure, the first 16 bits contain zeros, S represents the sign bit, INTEGER represents the integer portion of the width/height ratio, and FRACTION represents the fractional portion of the ratio. A 32-bit integer value of 0x80000000 indicates that this attribute is unchanged. spac Specifies the character spacing, or additional number of pixels to be inserted between characters. The value is a 16-bit signed integer. The preferred value for this parameter varies, based on the display in use. The maximum value that is allowed is equal to the display width in pixels. A value of 0x80000000 for this parameter indicates that the attribute is unchanged. Processed November 7, 1990 GSGTAT(3g,L) 2 GSGTAT(3g,L) AIX Technical Reference GSGTAT(3g,L) height Specifies the current character height for geometric text in pixels. This value is defined as a 16-bit signed integer, with the maximum value equal to the height of the display in pixels. A value of 0x80000000 for this parameter indicates that the attribute is unchanged. upvectx, upvecty Specify the x and y coordinates for the up direction of a character or text string. The valid range for these values is +/- the display dimensions in pixels. A value of 0x80000000 for this parameter indicates that the attribute is unchanged. The up vector is a two-dimensional vector on the text plane, specified by the current text draw. (The origin of the vector is defined by the geometric text command, gsgtxt.) Only the direction, not the length, of the vector is relevant. alignhz Specifies the horizontal alignment of the text for subsequent text drawing. Values are as follows: -1 Attribute is unchanged 1 Normal 2 Left 3 Center 4 Right alignvt Specifies the vertical alignment of the text for subsequent text drawing. Values are as follows: -1 Attribute is unchanged 1 Normal 2 Top 3 Cap 4 Half 5 Base 6 Bottom font_ID Specifies the ID of the font as a 32-bit integer, which defines the type of font to use. This ID is determined by the user while defining each geometric font. Possible values are: -1 A font_ID has been defined in a previous call to the gsgtat subroutine, and this attribute is unchanged. 1025 to 32767 These values are used to specify 1-byte geometric fonts, and refer to a value defined in each geometric font file. Processed November 7, 1990 GSGTAT(3g,L) 3 GSGTAT(3g,L) AIX Technical Reference GSGTAT(3g,L) 32768 to 65535 These values are used to specify 2-byte geometric fonts, and refer to a value defined in each geometric font file. Only 1 font_ID is active at any time. To change the font_ID, gsgtat must be called again with new font_ID and font parameters. When a new font_ID is specified, the previous font_ID is purged from the font table. For 2-byte geometric text, up to 128 segment IDs can be used per font_ID. When used with the font parameter, the font_ID is associated with the font used for font selection. font Contains the null-terminated full path name of the file used when the font attribute is specified as user. If a font_ID is defined, this parameter must also be defined. A value of -1 for this parameter indicates that the attribute is unchanged. For information on the format of font files for geometric text, see "Geometric Text Font Format." Attributes are only valid for the currently active font. This subroutine must be called before the gsgtxt subroutine or an error results. For Pascal, the application must declare the arrays passed as being fixed length and declare the routine as accepting arrays of that length. The k in the routine declaration must be a constant. RETURN VALUE GS_SUCC Successful. GS_COLI Invalid color index. GS_PREC Invalid text precision value. GS_EXPN Invalid character expansion factor. GS_FNTN Invalid file name. GS_INSV Invalid spacing value. GS_BASL Invalid baseline direction. GS_HIGH Invalid height value. GS_UPVT Invalid up vector value. GS_ALGN Invalid alignment value. RELATED INFORMATION In this book: "fonts," "Geometric Text Font Format," and "gsgtxt." Processed November 7, 1990 GSGTAT(3g,L) 4