GRAPHIC BOX, GRAPHIC HORZ-LINE, GRAPHIC VERT-LINE

Syntax

The GRAPHIC commands have the following syntax:

GRAPHIC ({line_int_lit|_var},{column_int_lit|_var}, {width_int_lit|_var})  BOX {depth_int_lit|_var} [rule_width_int_lit|_var[shading_int_lit|_var]]  GRAPHIC ({line_int_lit|_var},{column_int_lit|_var}, {length_int_lit|_var})  HORZ-LINE [rule_width_int_lit|_var]  GRAPHIC ({line_int_lit|_var},{column_int_lit|_var}, {length_int_lit|_var})  VERT-LINE [rule_width_int_lit|_var]

Description

Draws a box or line.

After GRAPHIC commands are carried out, SQR changes the current print location to the starting location of the graphic. This is different from the way the PRINT command works.

The GRAPHIC command has the following variations:

  • BOX

  • HORZ-LINE

  • VERT-LINE

The following sections describe the individual GRAPHIC commands:

Parameters

Parameter Description

BOX

BOX draws a box of any size at any location on the page. Boxes can be drawn with any size rule and can be shaded or left empty.

width and depth

The width is the horizontal size in character columns; depth is the vertical size in lines. The top left corner of the box is drawn at the line and column specified. The bottom right corner is calculated by the width and depth. You can specify relative placement with (+), (-), or numeric variables, as with regular print positions.

rule_width

The default rule width is 2 decipoints (an inch has 720 decipoints). The top horizontal line is drawn just below the base of the line above the starting point. The bottom horizontal line is drawn just below the base of the ending line. Therefore, a one-line deep box surrounds a single line.

shading

A number between 1 and 100, specifying the percentage of shading to apply. 1 is very light, and 100 is black. If no shading is specified, the box is blank. Specify a rule-width of zero if you do not want a border.

HORZ-LINE

HORZ-LINE draws a horizontal line from the location specified, for the length specified. Horizontal lines are drawn just below the base.

rule_width

The default rule width is 2 decipoints.

VERT-LINE

VERT-LINE draws a vertical line from the location specified for the length (in lines) specified. Vertical lines are drawn just below the base line of the line position specified to just below the base line of the line reached by the length specified. To draw a vertical line next to a word printed on line 27, position the vertical line to begin on line 26, for a length of 1 line.

rule_width

The default rule width is 2 decipoints.

Example

The following code example shows the GRAPHIC BOX command:

graphic (1,1,66) box 58 20     ! Draw box around page
graphic (30,25,10) box 10      ! Draw a 10-characters-wide-by-10- characters-long⇒
 box
graphic (1,1,66) box 5 0 8     ! Draw 5 line shaded box (without border)
graphic (50,8,30) box 1        ! Draw box around 1 line

The following code example shows the GRAPHIC HORZ-LINE command:

graphic (4,1,66) horz-line 10  ! Put line under page heading
graphic (+1,62,12) horz-line   ! Put line under final total

The following code example shows the GRAPHIC VERT-LINE command:

graphic (1,27,54) vert-line    ! Draw lines between columns
graphic (1,52,54) vert-line
graphic (3,+2,4) vert-line 6   ! Red line the paragraph

See The ALTER-PRINTER and DECLARE-PRINTER commands for information about setting and changing the FONT, FONT-TYPE, POINT-SIZE, and PITCH