nx_x11_paint_text_5x7.nx
buildroot/runtime/nx_x11_paint_text_5x7.nx
about
nx_x11_paint_text_5x7.nx -- bits-up text rendering using the
canonical 5x7 bitmap font (nx_font_bitmap_5x7).
For each character: get its 5x7 row pattern, paint a pixel rect
(size px_size) per ON bit. Composable with both windows and
pixmaps -- caller passes any X11 Drawable.
Calling convention:
nx_x11_paint_text_5x7(c, drawable, gc, x, y, text, len, px_size)
- x, y : top-left pixel of text baseline
- px_size : pixel scale (1=tiny, 2=readable, 3=large)
- text/len : caller-allocated NUL-OK byte buffer
- gc : caller-created GC with foreground = text color
Each char occupies px_size * (5+1) pixels horizontally and
px_size * (7+1) vertically (1 pixel of spacing baked in).
license_tier: ORIGINAL
lineage_id: nishi_x11_paint_text_5x7_q10
dependencies 5 imports · 3 importers
imports: nx_syscalls.nxnx_x11_connect.nxnx_x11_window.nxnx_x11_paint.nxnx_font_bitmap_5x7.nx
imported by: nx_browser_demo_test.nxnx_render_wiki_styled_window.nxnx_render_wiki_window.nx
structs
| none |
consts
| none |
functions
| 29 | func nx_x11_paint_glyph_5x7(c: *X11Conn, drawable: i64, gc: i64, |
| 54 | func nx_x11_paint_text_5x7(c: *X11Conn, drawable: i64, gc: i64, |
| 67 | func main() -> i64 |