^GE - Graphic Ellipse
Draws an ellipse.
^GE draws an ellipse inscribed in a bounding box of a given width and height.
Equal sides give a circle, so
^GC is a convenience for the case where one diameter is enough.
Syntax
^GEw,h,t,cSupport
Every documented parameter renders the same output Labelary produces.
Labelary renders this command.
Parameters
wEllipse widthoptional · dotsWidth of the ellipse's bounding box in dots.
- Default
- the value of
t - Accepted range
- 3 to 4095 dots
- Invalid value
- clamped to the nearest allowed value
- Test coverage
- Bounds pinned: below the minimum (2), above the maximum (4096). No test at the minimum or maximum. The invalid-value rule is pinned by 2 tests.
hEllipse heightoptional · dotsHeight of the ellipse's bounding box in dots.
- Default
- the value of
t - Accepted range
- 3 to 4095 dots
- Invalid value
- clamped to the nearest allowed value
- Test coverage
- Bounds pinned: above the maximum (4096). No test at the minimum or maximum. The invalid-value rule is pinned by 2 tests.
tBorder thicknessoptional · dotsThickness of the outline, drawn inwards. A thickness of at least half the shorter axis fills the ellipse solid.
- Default
- 1
- Accepted range
- 1 to 4095 dots
- Invalid value
- clamped to the nearest allowed value. As with
^GC, the real minimum is 1, not the 2 the guide documents, and the renderer reports only values below 1. We measured this on 2026-07-12. - Test coverage
- Bounds pinned: minimum (1), above the maximum (4096), past what the shape can hold (100). No test at the maximum. The invalid-value rule is pinned by 2 tests.
cLine colouroptional · one of a setColor of the outline and fill.
- Default
- B
- Invalid value
- discarded, and the default applies. Any value other than
BorWdraws black. - Test coverage
- Values exercised: W. Not exercised: B. The invalid-value rule is not pinned by a test.
B- Black (default)
W- White, which erases what the ellipse covers
Behavior
The preceding ^FO or ^FT positions the bounding box, and ^FS ends it. ^FO
places the top-left corner, so the center of the ellipse lands at half the width and
half the height beyond it. Nothing draws the box itself.
Both axes are limited to 4095 dots, four times tighter than the 32000 that
^GB accepts. On an 8 dpmm printer 4095 dots is about 512 mm, so the limit reaches only very large
media. It is hard: the renderer clamps a larger value to 4095 and does not reject it.
The thickness draws inwards from the outline. At half the shorter axis the outline
meets itself and the ellipse is solid. As for ^GC, the guide gives a minimum
thickness of 2 and a default of 1. The real minimum is 1, and it draws a single-dot
outline.
Color W draws white over what is already on the label, and hides what precedes it
in the format.
Tested behavior
Differences from the specification
Labelary against the ZPL II guide
Where Labelary — our compatibility target — behaves differently from the printed specification.
- The guide contradicts itself as it does for
^GC: minimum 2, default 1, for the border thickness. The real minimum is 1. We measured this on 2026-07-12. — pinned bytest_ge_thickness_one_is_silent
Example
A wide outlined ellipse, a solid one, and a circle drawn as an ellipse with equal axes:
^XA
^FO50,50^GE240,120,3^FS
^FO330,50^GE240,120,60^FS
^FO50,220^GE120,120,3^FS
^XZ
Related commands
^GBGraphic BoxDraws a rectangle, a line or a filled block.^GCGraphic CircleDraws a circle.^GDGraphic Diagonal LineDraws a diagonal line across a bounding box.^FOField OriginSets the top-left corner of the next field.