Plain English

Draws a rectangle (box) from the top-left corner (x1,y1) to the bottom-right corner (x2,y2) with the specified line thickness. An optional radius parameter rounds the corners.

When to use

For drawing borders, boxes, table cells, and rectangular frames on your label.

Syntax

BOX x1,y1,x2,y2,thickness[,radius]

Parameters

ParameterDescription
x1Top-left X coordinate in dots
y1Top-left Y coordinate in dots
x2Bottom-right X coordinate in dots
y2Bottom-right Y coordinate in dots
thicknessLine thickness in dots
radiusCorner radius in dots (optional, default 0)

Example

BOX 20,20,380,260,2

Draw a rectangle from (20,20) to (380,260) with 2-dot lines

Try it in the playground View all TSPL commands