HTBasic Help
×
Menu
Index

LABEL Statement

 
To annotate a graphics image with text the LABEL statement is used. The CSIZE, LDIR, LORG and GFONT IS statements control the graphic text size, direction, origin and font, respectively.
 
The LABEL statement draws graphic text beginning at the current pen position, in the current pen number and line type. Labels are clipped at the soft-clip boundary just like any other graphics. The scaling of the SHOW and WINDOW statements have no effect on the LABEL statement. This keeps them from becoming distorted by the scaling of graphic data.
 
The LABEL statement is similar to the PRINT statement except that the text is drawn on the graphics screen. See the PRINT statement for an explanation of arrays, numeric and string fields, and numeric and string formats. Also the following control characters have a special meaning when processed by the LABEL statement:
         
Keystroke
Character
Action
CTRL-H
CHR$(8)
moves pen left one character cell
CTRL-J
CHR$(10)
moves pen down one character cell
CTRL-M
CHR$(13)
moves pen left length of completed label
 

CSIZE

The CSIZE statement sets the character size (height) and optionally the expansion factor (width/ height) for the text generated by the LABEL statement. For example:
 

CSIZE 10,.8

 
Both values are specified in graphic display units. The default character height is five and the default expansion factor is 0.6. These values are in effect at start-up, or when GINIT, or RESET are executed. A negative height or expansion-factor inverts the character in relation to that dimension.
 

CONFIGURE LABEL

CONFIGURE LABEL defines additional characters for use with the LABEL statement. Characters in the range 33 to 255 may be defined. You may define one character by giving the character number and a simple string or several characters by giving the starting character number and a string array. To delete a definition, use a zero length string for the definition. Each character in the definition strings has the form CHR$(Move + x*16+ y), where Move is 0 or 128, x ranges from 0 (far left) to 7 and y ranges from 0 (bottom) to 15. The baseline is y=5.
 
The following example defines the character "H":
 
A$=CHR$(133)&CHR$(14)&CHR$(238)&CHR$(101)&CHR$(138)&CHR$(106)
CONFIGURE LABEL 72 TO A$ 
 
More information is presented in "International Language Support" in the User’s Guide.