Vous êtes sur la page 1sur 4

16/07/13

SAPscript: Definition of borders, lines, and shading

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 ./ :B O X[ X P O S ][ Y P O S ][ W I D T H ][ H E I G H T ][ F R A M E ][ I N T E N S I T Y ] 2 ./ :P O S I T I O N[ X O R I G I N ][ Y O R I G I N ][ W I N D O W ][ P A G E ] 3 ./ :S I Z E[ W I D T H ][ H E I G H T ][ W I N D O W ][ P A G E ]

1 ./ :B O X[ X P O S ][ Y P O S ][ W I D T H ][ H E I G H T ][ F R A M E ][ I N T E N S I T Y ]

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
help.sap.com/saphelp_45b/helpdata/en/65/897415dc4ad111950d0060b03c6b76/content.htm 1/4

16/07/13

SAPscript: Definition of borders, lines, and shading

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 / :B O XF R A M E1 0T W Draws a frame around the current window with a frame thickness of 10 TW (= 0.5 PT) / :B O XI N T E N S I T Y1 0 Shades the window background with a density (gray shade) of 10 % / :B O XH E I G H T0T WF R A M E1 0T W Draws a horizontal line at the upper window border over the entire window width / :B O XW I D T H0T WF R A M E1 0T W Draws a vertical line at the left window border over the entire window height / :B O XW I D T H' 1 7 . 5 'C MH E I G H T' 1 'C MF R A M E1 0T WI N T E N S I T Y1 5 / :B O XW I D T H' 1 7 . 5 'C MH E I G H T' 1 3 . 5 'C MF R A M E1 0T W / :B O XX P O S' 1 0 . 0 'C MW I D T H0T WH E I G H T' 1 3 . 5 'C MF R A M E1 0T W / :B O XX P O S' 1 3 . 5 'C MW I D T H0T WH E I G H T' 1 3 . 5 'C MF R A M E1 0T W Draws two rectangles and two lines to construct a three-column table with a highlighted heading line 2 ./ :P O S I T I O N[ X O R I G I N ][ Y O R I G I N ][ W I N D O W ][ P A G E ]

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
help.sap.com/saphelp_45b/helpdata/en/65/897415dc4ad111950d0060b03c6b76/content.htm 2/4

16/07/13

SAPscript: Definition of borders, lines, and shading

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 / :P O S I T I O NW I N D O W Sets the coordinate origin to the upper left window corner point / :P O S I T I O NX O R I G I N2C MY O R I G I N' 2 . 5C M ' Sets the coordinate origin to 2 CM measured from the left page border and 2.5 CM measured from the upper page border / :P O S I T I O NX O R I G I N' 1 . 5 'C MY O R I G I N1C M Moves the upper left coordinate origin 1.5 cm to the left and 1 cm up 3 ./ :S I Z E[ W I D T H ][ H E I G H T ][ W I N D O W ][ P A G E ]

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
help.sap.com/saphelp_45b/helpdata/en/65/897415dc4ad111950d0060b03c6b76/content.htm 3/4

16/07/13

SAPscript: Definition of borders, lines, and shading

Examples / :S I Z EW I N D O W Sets WIDTH and HEIGHT to the window dimensions / :S I Z EW I D T H' 3 . 5 'C MH E I G H T' 7 . 6 'C M Sets WIDTH to 3.5 cm and HEIGHT to 7.6 cm / :P O S I T I O NW I N D O W / :P O S I T I O NX O R I G I N2 0T WY O R I G I N2 0T W / :S I Z EW I D T H+ 4 0T WH E I G H T+ 4 0T W / :B O XF R A M E1 0T W 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.

help.sap.com/saphelp_45b/helpdata/en/65/897415dc4ad111950d0060b03c6b76/content.htm

4/4

Vous aimerez peut-être aussi