Egui::Painter
Inherits Reference < Object
Constructors
Instance methods
CSS box-shadow — see ShadowCmd. Paint order is the caller's
business, mirroring CSS: an outset shadow goes UNDER the widget
(call before the fill rect), an inset one over it (after).
egui GraphicLayers::drain(order): flatten per layer, back to
front — ascending z; within one z, push order (registration
order) decides, so a container's back-filled frame stays under
its contents.
Full quad of the texture by default; nearest requests point
sampling (pixel-art canvases).
Which layer subsequently pushed commands belong to (egui
Painter::with_layer_id): either a named Order or an explicit
numeric z (see LayerId).
Paint a laid-out Galley with pos as its top-left corner
(upstream Painter::galley). Emits one TextCmd per row run —
that's where per-run colors come from — plus underline lines.
family: is the stack the galley was laid out with, so the draw
commands hit the same font the measurement used; a run carrying
its OWN family (inline code) or variant flags (bold/italic)
overrides it per run — resolve (a Context#fonts_for closure)
supplies that stack for the underline/strike/chip width
measurement, exactly like Fonts#layout did for the wrap.
Vertical gradient fill (top c1 → bottom c2).
Replace-blend rect: instead of blending over the destination, it
OVERWRITES it — rgb AND alpha — with color given straight
(non-premultiplied); the command carries it premultiplied, ready
for an alpha-composited (per-pixel-transparent) swapchain. This
is the primitive for a widget that must show the desktop through
an otherwise opaque UI (the terminal grid): it punches the exact
alpha into the framebuffer, no blending needed behind it. In a
normal opaque window it degenerates to a plain solid rect.
Draw text with pos as the LEFT-CENTER of the text bounding box
(upstream anchors at the galley's left edge + baseline; backends
convert using their font metrics — see backend/sokol/fontstash).
family: draws through that named stack (Context#fonts_for);
nil uses the primary one. bold:/italic: draw through the
primary stack's REAL variant faces (a missing variant degrades to
the base face — no emulation).