std1.0.0-beta-7 SafeC docs

Module gui::gui_draw

#include <std/gui/gui_draw.h> source

GUI: software rasterizer.

Draws directly into a struct GuiWindow's RGBA8888 pixel buffer (see gui.h) — rectangles, borders, lines, and text via a built-in 8x8 bitmap font. This is the same portable drawing surface every gui_* backend shares, so a UI drawn with these calls looks identical on Cocoa, Win32, X11, and bare metal alike (no native widget rendering involved). The retained-mode widget layer in gui_widget.h is built entirely on top of this — application code can also call these directly for fully custom drawing (see gui_widget.h's WidgetDrawFn hook).

Functions

gui_text_widthWidth/height in pixels 'text' would occupy if drawn with the built-in font at the given scale, without actually drawing it — used by widgets to size themselves to their label/text content.
gui_text_height