BOXR, CBOXR |
Top Previous Next |
Syntax
1. boxr col|{numexpr}, row|{numexpr}, cols|{numexpr}, rows|{numexpr} [,thickness] [,shade|{numexpr}] [,color] [,rgb rrggbb] [,tl=topleft] [,tr=topright], [,bl=bottomleft], [,br=bottomright] [,icols=gridcols] [,irows=gridrows] [,ccols=gridcols] [,crows=gridrows] [,lcolor=color] [,lcolor rgb=rrggbb] [,scolor=color] [,scolor rgb=rrggbb]
2. boxr "text|!=text|~regexp|!~regexp[@left,top,right.bottom]", col|{numexpr}, row|{numexpr}, cols|{numexpr}, rows|{numexpr} [,thickness] [,shade|{numexpr}] [,color] [,rgb rrggbb] [,tl=topleft] [,tr=topright], [,bl=bottomleft], [,br=bottomright] [,icols=gridcols] [,irows=gridrows] [,ccols=gridcols] [,crows=gridrows] [,lcolor=color] [,lcolor rgb=rrggbb] [,scolor=color] [,scolor rgb=rrggbb]
If cboxr is used, then columns and rows are interpreted to be the opposite corner of the box, and columns and rows are calculated by UnForm.
Description
A box with rounded corners of the indicated dimensions will be drawn. All dimensions can be specified to 2 decimal places, in the range of -255 to +255. Whole number col and row represent center points; lines are drawn to the center point of the character position identified in order to facilitate connections between lines. If used, numexpr is a Business Basic expression that generates a numeric value for the column, row, columns, or rows.
If syntax 2 is used, then the box is drawn relative to any occurrence of the text, or of text that matches the regular expression regexpr. In these cases, there may be no boxes drawn, or several. column and row are 0-based, in these formats, and can be negative if required. The search for text or regexpr can be limited to a region on the page by adding a suffix in the format '@left,top,right,bottom'. To use a literal "@" character in text or regexpr, it is necessary to specify "\@".
If the syntax "!=text" or "!~regexpr" is used, then the search is for positions NOT equal to the text or NOT matching the regular expression. When using the NOT syntax, only one search is performed per line in the search region.
Line Thickness The optional thickness parameter may be a number from 1 to 99, indicating the number of dots or pixels to use when drawing the box outline. The default thickness is 1 pixel. UnForm always uses dots at 1/300 inch. If a shade parameter is desired, then the thickness parameter is required.
Corner Rounding To specify the degree of rounding for different sides, specify values for tl, tr, bl, and br, as desired. The specification for each corner is col:row:scale, where col is the number of columns from the corner to begin the rounding, row is the number of rows from the corner to begin rounding, and scale is the level of rounding, from –100 for fully convex, to 100 for fully concave, where 0 becomes a straight line from the column and row break points. If no rounding options are specified at all, then UnForm will apply default rounding to all four corners. If any rounding is specified, then any unspecified corners become square corners.
Shading The optional shade parameter may be used to specify a "percent gray" value of from 1 to 100. Most laser printers can only print about 8 different shades of gray, so a value of 45, for example, may print the same pattern as 50. Note that if you specify a shade level of 0, this differs from not specifying any shade at all: a shade level of 0 will force a white interior, even if another box or shade command draws shading inside the bounds of the box.
Color Color can be specified as "white", "cyan", "magenta", "yellow", "blue", "green", "red", or "black", or you can name an RGB value as a 6-character hex string with "rgb rrggbb", where rr is red (00-FF), gg is green (00-FF), and bb is blue (00-FF). To distinguish colors between the line and the shade region, use "lcolor" or "lcolor rgb" for lines, and "scolor" or "scolor rgb" for shade.
Grids The gridcols and gridrows settings are used to draw grid lines and/or shade regions inside the box. gridcols specifies one or more vertical column settings in the structure of column[:thickness[:shade[:color|rrggbb]]]. Multiple columns can be delimited by any character other than digits, the decimal point (.), and the colon. Each column designates a vertical line to draw from the top to bottom edges of the outer box. If a thickness is specified, then the line is drawn using that thickness (0 would draw no line at all). The default thickness is 1. If shade is specified, then a shade region is draw from the left edge or prior column. gridrows is identical in structure to gridcols, but specifies the horizontal rows rather than vertical columns. The "icols" and "irows" introducers indicate columns and rows relative to the upper left corner of the outer box. The "ccols" and "crows" introducers indicate absolute columns and rows. In each case, any column or row specification outside the bounds of the box is ignored.
For partial shading, partial color shading, or multiple colors shading, see the shade keyword. You can improve the look of shade regions on laser printers, especially at medium shade levels and 600 or higher dpi settings, by using the gs command.
Zebra Printers Zebra output supports rounded corner boxes somewhat differently than laser/pdf output. All corners have the same scale of rounding, so the first corner option (tl, rt, bl, br) is used for all corners. The scale value must be a number from 1 to 8, indicating the scale of rounding the printer performs. For example, tl=::6 would apply a rounding scale of 6. The col and row parameters of the corner specification are ignored. Examples:
boxr 10,9.5,70,4.25,2,5,lcolor=blue will draw a box with default rounding on all corners, with a 2 pixel edge and 5% shading. The edge line will be drawn in blue if the output device supports color.
cboxr 0.5,60,80.5,66,1,0,bl=3:1.5:75,br=3:1.5:75 will draw a box with corners 0.5,60 and 80.5,66, with a 1 pixel border, no shading, and just the bottom left and right corners rounded. The rounding will start 3 columns and 1 row from the corners, and be rounded outward.
Drivers: pcl, pdf, ps (pcl cannot have –nohpgl specified), zebra (see notes)
|