Emits an axis-aligned rectangle. If stroke_width is a finite
positive value, the rectangle is rendered as an outlined ring
of that thickness centered on the edges; if stroke_width is
NaN, the rectangle is rendered filled.
Note: stroked rectangles produce a bounding box covering the
full outer rectangle, so if the pen is a GPU fragment-shader
backend, the shader runs for every interior pixel even though
only the outline contributes coverage. For very thin
outlines where the interior is much larger than the stroke,
emitting four hb_draw_line() segments (one per edge) is
considerably cheaper per frame.
Emits an axis-aligned rectangle. If
stroke_widthis a finite positive value, the rectangle is rendered as an outlined ring of that thickness centered on the edges; ifstroke_widthisNaN, the rectangle is rendered filled.Note: stroked rectangles produce a bounding box covering the full outer rectangle, so if the pen is a GPU fragment-shader backend, the shader runs for every interior pixel even though only the outline contributes coverage. For very thin outlines where the interior is much larger than the stroke, emitting four
hb_draw_line()segments (one per edge) is considerably cheaper per frame.