Datamax 7A300007 Rev. 2 Draw Rectangle DrawRectangle x1, y1, x2, y2,color,width, Command Name

Models: 7A300007 Rev. 2

1 67
Download 67 pages 48.07 Kb
Page 44
Image 44

Command

Name

<b>, </b>

Bold

<u>, </u>

Underline

<h = value>

Text Height

<w = value>

Text Width

<f = value>

Font

\n

New Line

\<, \>, \”, \\

Literals

Description

Text enclosed by <b> and </b> appear in bold. Text enclosed by <u> and </u> are underlined.

Text height is magnified by the given numeric value. Use <h = 1> to return to original size. Text width is magnified by the given numeric value. Use <w = 1> to return to original size. Sets the font. value = {0 .. 9}.

Moves the cursor to the beginning of the next line. Use backslashes to print these special characters.

Example: The figure below shows the use of the “\n” command as well as the effect of the angle command in the text being printed with the DrawText command

Draw Rectangle

DrawRectangle (x1, y1, x2, y2,color,width);

Draws a rectangle object at any coordinate on the canvas.

DrawRectangle command draws either a hollow or a filled rectangle. (x1, y1) and (x2, y2) specify the two diagonally opposing corners. All measurements are in dots.

Parameters:

x1, y1

Top left corner coordinates (x1, y1)

x2, y2

Bottom right corner coordinates (x2, y2)

color

Specifies the line or fill color: 0 = white, 1 = black

 

The user may draw a white rectangle on a black background only by specifying color

 

parameter = 0.

width

Specifies the line width of a hollow rectangle. A zero-width results in a filled rectangle

Draw Bar Code

DrawBarcode(x,y,angle,annotate,type,height, "data");

Draws a barcode object at any coordinate on the canvas.

Parameters:

X

Indicates location on “x”

axis of the left top corner

Y

indicates location on “y”

axis of the left top corner

angle

Values 0, 1, 2, or 3 allow the barcode to be rotated 0, 90, 180, or 270 degrees respectively

annotate

Setting annotate to 1 allows human-readable text to appear. ‘0’ disables this function.

type

Indicates the barcode type to be printed. The barcodes supported are listed below:

38

Page 44
Image 44
Datamax 7A300007 Rev. 2 manual Draw Rectangle DrawRectangle x1, y1, x2, y2,color,width, Command Name