^GB — Graphic Box
Plain English
Draws a rectangle. Thin and wide → horizontal line; thin and tall → vertical line; thick border → outlined box. **Fill rule:** when `t >= min(w, h)` the rectangle is rendered as a solid filled shape (handy for black bars and reverse-text backgrounds). Corner rounding (`r` 0-8) softens the corners — useful for badge-style headers.
When to use
For divider lines between sections, borders around content, filled bars under reverse-printed text (`^FR`), or rounded badge backgrounds. To force a fill without computing thickness, set `t` to the larger of `w` and `h`.
Syntax
^GBw,h,t,c,r
Parameters
| Parameter | Description |
|---|---|
w | Width in dots (1–32000) |
h | Height in dots (1–32000) |
t | Border thickness in dots. Fill triggers when `t >= w` or `t >= h`. |
c | Colour: `B` (black) or `W` (white). White on black background reverses out the underlying area. |
r | Corner rounding: 0 (sharp) to 8 (most rounded) |
Example
^XA ^FO50,50^GB500,2,2,B,0^FS ^FO50,70^GB200,100,3,B,4^FS ^FO50,190^GB200,40,40,B,0^FS ^XZ
Three shapes: a 2-dot horizontal line, a 200×100 rounded outlined box (radius 4), and a solid black bar (`t=40 >= h=40` triggers fill).