Show TOC

SAPscript: Definition of borders, lines, and shading

Description

In SAPscript Release 3.0A, text commands were introduced for drawing borders, lines, and shading. Parameters can be set for position, size, border thickness, and shading. Within a layout set, individual windows or specific text passages within a window can therefore be output with a border or shading.

The SAP printer drivers based on page printers (HP Laserjet driver, Postscript driver, Kyocera Prescribe driver) convert this command during output. All other line printers or page printers not supported in the standard version ignore these commands.
This printout can be displayed in the SAPscript previewer (30A: UNIX Motif , 30B: DOS, NT WINDOWS).

How are the borders defined in the layout set?

Using the following new text commands:


1. /: BOX [XPOS] [YPOS] [WIDTH] [HEIGHT] [FRAME] [INTENSITY]

2. /: POSITION [XORIGIN] [YORIGIN] [WINDOW] [PAGE]

3. /: SIZE [WIDTH] [HEIGHT] [WINDOW] [PAGE]






1. /: BOX [XPOS] [YPOS] [WIDTH] [HEIGHT] [FRAME] [INTENSITY]

Effect

Draws a box at this position with the specified size.


Additional

XPOS, YPOS, WIDTH, HEIGHT and FRAME always require

specifs.

a measurement and a unit of measurement to be specified. The additional specification INTENSITY requires the specification of a percent number between 0 and 100.


  • XPOS, YPOS
    Upper left corner of box, based on the values from the POSITION command.
    Default: Values from POSITION command

    The following internal calculation rule is used to determine the absolute output position of a box on the page:
    X(abs) = XORIGIN + XPOS
    Y(abs) = YORIGIN + YPOS
  • WIDTH
    Width of box
    Default: WIDTH value from SIZE command
  • HEIGHT
    Height of box
    Default: HEIGHT value from SIZE command
  • FRAME
    Frame thickness
    Default: 0 (no frame line)
  • INTENSITY
    Density of the box contents in %
    Default: 100 (solid black)

Measurements

Decimal measurements must be enclosed in inverted commas as literals (like ABAP number constants). The period should be used as the decimal point. Also see the following examples.


Unit

Valid units of measurement are TW (twip), PT (point), IN (inch), MM (millimeter), CM (centimeter), LN (line), CH (character). The following conversions apply:
1 TW = 1/20 PT
1 PT = 1/72 IN
1 IN = 2.54 CM
1 CM = 10 MM
1 CH = character height from layout set header (CPI)
1 LN = line height from layout set header (LPI)


Examples


/: BOX FRAME 10 TW

Draws a frame around the current window with a frame thickness of 10 TW (= 0.5 PT)


/: BOX INTENSITY 10

Shades the window background with a density (gray shade) of
10 %


/: BOX HEIGHT 0 TW FRAME 10 TW

Draws a horizontal line at the upper window border over the entire window width


/: BOX WIDTH 0 TW FRAME 10 TW

Draws a vertical line at the left window border over the entire window height


/: BOX WIDTH '17.5' CM HEIGHT '1' CM FRAME 10 TW INTENSITY 15

/: BOX WIDTH '17.5' CM HEIGHT '13.5' CM FRAME 10 TW

/: BOX XPOS '10.0' CM WIDTH 0 TW HEIGHT '13.5' CM FRAME 10 TW

/: BOX XPOS '13.5' CM WIDTH 0 TW HEIGHT '13.5' CM FRAME 10 TW

Draws two rectangles and two lines to construct a three-column table with a highlighted heading line


2. /: POSITION [XORIGIN] [YORIGIN] [WINDOW] [PAGE]

Effect

Determines the origin of the coordinate system for the parameters XPOS and YPOS from the BOX command. When the window is output, the POSITION value is set to the upper left corner point of the window (default setting).


Additional

If a parameter value does not have a sign, its value is

specifs.

regarded as an absolute value, this means the values refer to the upper left corner point of the output page. If a parameter value does have a sign, the new value of this parameter is calculated relative to the old value. If a parameter is missing, the current value of this parameter is not changed.


  • XORIGIN, YORIGIN
    Origin of the coordinate system
  • WINDOW
    Sets the values for left and upper border to the values of the current window (default setting)
  • PAGE
    Sets the values for left and upper border to the values of the current output page (XORIGIN = 0 cm, YORIGIN = 0 cm)

Examples


/: POSITION WINDOW

Sets the coordinate origin to the upper left window corner point


/: POSITION XORIGIN 2 CM YORIGIN '2.5 CM'

Sets the coordinate origin to 2 CM measured from the left page border and 2.5 CM measured from the upper page border


/: POSITION XORIGIN '-1.5' CM YORIGIN -1 CM

Moves the upper left coordinate origin 1.5 cm to the left and 1 cm up


3. /: SIZE [WIDTH] [HEIGHT] [WINDOW] [PAGE]

Effect

Determines the values for the parameters WIDTH and HEIGHT from the BOX command. When a window is output, the SIZE value is set to the corresponding values of this window (default setting).


Additional

If a parameter is missing in the command, the current value

specifs.

of this parameter is not changed. If a parameter value does not contain a sign, its value is regarded as an absolute value. If a parameter value does contain a sign, the new value of this parameter is calculated relative to the old value.


  • WIDTH, HEIGHT
    Dimension of the rectangle or line
  • WINDOW
    Sets the values for width and height to the corresponding values of the current window (default setting)
  • PAGE
    Sets the values for width and height to the corresponding values of the current output page

Examples


/: SIZE WINDOW

Sets WIDTH and HEIGHT to the window dimensions


/: SIZE WIDTH '3.5' CM HEIGHT '7.6' CM

Sets WIDTH to 3.5 cm and HEIGHT to 7.6 cm


/: POSITION WINDOW

/: POSITION XORIGIN -20 TW YORIGIN -20 TW

/: SIZE WIDTH +40 TW HEIGHT +40 TW

/: BOX FRAME 10 TW

The current window is framed. The frame projects beyond the beginning of the window so that the first and last text characters are not overwritten.