|
RMGui 0.15.0
C11 retained-mode UI library: layout kernel, style schema, widget painters, fonts, software framebuffer
|
Explicit, bounded paint destinations. More...
#include "draw.h"#include "image_fill.h"#include "layer.h"#include "gradient.h"#include "rounded.h"#include "backdrop.h"#include "emboss.h"#include "particle.h"Data Structures | |
| struct | rmgui_draw_command_t |
| Exactly 64 bytes. More... | |
| struct | rmgui_source_stamp_t |
| Caller-owned stable source identity and revision. More... | |
| struct | rmgui_draw_resource_t |
| CAPTURE_RGBA with offset SIZE_MAX imports the identical framebuffer captured by an ancestor before the command consuming this scope. More... | |
| struct | rmgui_draw_stream_t |
| Caller supplies all storage before painting. More... | |
| struct | rmgui_target_t |
| Tagged destination: a record target has no framebuffer or pixel pointer. More... | |
| struct | rmgui_target_mask_args_t |
| Mask/radius payload for BLIT_MASKED; offsets are stream-relative. More... | |
| struct | rmgui_target_nine_args_t |
| Nine-patch value payload with integer scale percent. More... | |
| struct | rmgui_target_tile_args_t |
| Tile value payload with surface-space origin and scale percent. More... | |
| struct | rmgui_target_layer_args_t |
| Layer value payload preserves every transform component. More... | |
| struct | rmgui_target_basic_args_t |
| data is copied with memcpy into these layouts; no pointer casts or alignment assumptions apply. More... | |
| struct | rmgui_target_array_args_t |
| Array payload reference and optional polygon color. More... | |
| struct | rmgui_target_aa_args_t |
| AA shape values in Q16 device pixels; see the command map above. More... | |
| struct | rmgui_target_blit_args_t |
| Source rectangle, tint and opcode-dependent extra value. More... | |
| struct | rmgui_target_contour_args_t |
| PATH_FILL/PATH_STROKE share this data[24] layout. More... | |
| struct | rmgui_target_gradient_args_t |
| Linear endpoints or radial centre/from and Q16 radii/to; stops_offset refers to count rmgui_gradient_stop_t values, count in 1..16. More... | |
| struct | rmgui_target_rounded_args_t |
| Per-corner radii, stroke width_q16 or glow blur in value, straight color. More... | |
| struct | rmgui_target_border_args_t |
| Checked independent border side widths; flags selects OVER/ADD. More... | |
| struct | rmgui_target_shadow_args_t |
| CPU window-frame silhouette, uniform radius and blur in device pixels. More... | |
| struct | rmgui_target_layer_shadow_args_t |
| Full transformed scope and its deterministic rounded-rect shadow. More... | |
| struct | rmgui_target_backdrop_args_t |
| Radial uses x/y/radius; noise uses seed/cell_log2/offset_x/offset_y. More... | |
| struct | rmgui_target_backdrop_tile_args_t |
| Repeated premultiplied tile offsets and optional A8 mask resource index. More... | |
| struct | rmgui_target_emboss_args_t |
| Relief mask values; resource carries the immutable coverage mask. More... | |
| struct | rmgui_target_particles_args_t |
| Immutable particle state snapshot, deterministic fade and streak length. More... | |
| struct | rmgui_target_shade_args_t |
| Shaded nine-patch/tile parameters, copied by value. More... | |
Macros | |
| #define | RMGUI_VERIFY_PINNED_SOURCES 1 |
| #define | RMGUI_TARGET_LAYER_DEPTH_MAX 32 |
| Maximum active layer scopes, including the root. | |
Functions | |
| rmgui_target_t | rmgui_target_cpu (rmgui_fb_t *fb) |
| Wrap a valid CPU framebuffer, preserving all existing primitive semantics. | |
| rmgui_target_t | rmgui_target_record (rmgui_draw_stream_t *stream, int width, int height) |
| Bind empty caller-owned bounded storage to an extent. | |
| void | rmgui_target_refuse (rmgui_target_t *target, const char *operation) |
| Latch an explicit unsupported operation; CPU targets are unchanged. | |
| rmgui_target_status_t | rmgui_target_finish (rmgui_draw_stream_t *stream) |
| Seal once and report the first failure; error releases resources. | |
| void | rmgui_target_discard (rmgui_draw_stream_t *stream) |
| Cancel every resource and reset counts/status for explicit retry. | |
| rmgui_target_status_t | rmgui_target_submit (rmgui_draw_stream_t *stream, rmgui_fb_t *destination, void *scratch, size_t scratch_capacity) |
| Validate all resources, commands and replay destinations before any writes; replay once and release resources. | |
| rmgui_draw_command_t * | rmgui_target_command (rmgui_target_t *target, rmgui_target_op_t op) |
| Append a value command; returns NULL and latches capacity/state on failure. | |
| size_t | rmgui_target_payload (rmgui_target_t *target, const void *bytes, size_t size, size_t alignment) |
| Reserve aligned payload; SIZE_MAX on exhaustion. | |
| uint32_t | rmgui_target_source (rmgui_target_t *target, const rmgui_fb_t *source, int snapshot) |
| Pin a caller source, or snapshot transient RGBA bytes; UINT32_MAX on error. | |
| uint32_t | rmgui_target_source_stamped (rmgui_target_t *, const rmgui_fb_t *, const rmgui_source_stamp_t *) |
| Declare a generation-stamped pin before any painter first uses this source. | |
| uint32_t | rmgui_target_mask_stamped (rmgui_target_t *, const rmgui_mask_t *, const rmgui_source_stamp_t *) |
| uint32_t | rmgui_target_glyph (rmgui_target_t *target, uint64_t face_generation, int glyph, int pixel_size, const unsigned char *coverage, int width, int height, int stride, int xoff, int yoff) |
| Capture unique strided A8 coverage immediately; no cache pointer is retained. | |
| void | rmgui_fb_clear_to (rmgui_target_t *, rmgui_color_t) |
| Verbatim clear over the target extent; failure latches for RECORD. | |
| void | rmgui_fb_fill_rect_to (rmgui_target_t *, rmgui_rect_t, rmgui_color_t) |
| Verbatim clipped fill, matching rmgui_fb_fill_rect. | |
| void | rmgui_draw_pixel_to (rmgui_target_t *, int, int, rmgui_color_t) |
| Straight-over pixel, matching rmgui_draw_pixel. | |
| void | rmgui_draw_hline_to (rmgui_target_t *, int, int, int, rmgui_color_t) |
| Straight-over horizontal run, matching rmgui_draw_hline. | |
| void | rmgui_draw_vline_to (rmgui_target_t *, int, int, int, rmgui_color_t) |
| Straight-over vertical run, matching rmgui_draw_vline. | |
| void | rmgui_draw_rect_to (rmgui_target_t *, rmgui_rect_t, rmgui_color_t) |
| Straight-over outline with draw.h corner ownership. | |
| void | rmgui_draw_fill_rect_to (rmgui_target_t *, rmgui_rect_t, rmgui_color_t) |
| Straight-over clipped fill, matching rmgui_draw_fill_rect. | |
| void | rmgui_draw_fill_rounded_to (rmgui_target_t *, rmgui_rect_t, int, rmgui_color_t) |
| Integer-isqrt rounded fill, matching rmgui_draw_fill_rounded. | |
| void | rmgui_draw_line_to (rmgui_target_t *, int, int, int, int, rmgui_color_t) |
| Inclusive Bresenham line with draw.h half-toward-start rounding. | |
| void | rmgui_draw_vgrad_to (rmgui_target_t *, rmgui_rect_t, const rmgui_draw_vgrad_stop_t *, int) |
| Opaque vertical gradient; RECORD snapshots the stop array before return. | |
| void | rmgui_draw_bevel_raised_to (rmgui_target_t *, rmgui_rect_t, rmgui_color_t, rmgui_color_t) |
| Opaque raised bevel with draw.h edge ownership. | |
| void | rmgui_draw_bevel_recessed_to (rmgui_target_t *, rmgui_rect_t, rmgui_color_t, rmgui_color_t) |
| Opaque recessed bevel with draw.h edge ownership. | |
| void | rmgui_draw_aa_disc_to (rmgui_target_t *, rmgui_rect_t, rmgui_draw_point_t, int32_t, rmgui_color_t, rmgui_draw_mode_t) |
| Q16 disc, explicit clip and draw.h 16x16 coverage; OVER or ADD. | |
| void | rmgui_draw_aa_ring_to (rmgui_target_t *, rmgui_rect_t, rmgui_draw_point_t, int32_t, int32_t, rmgui_color_t, rmgui_draw_mode_t) |
| Q16 ring, explicit clip and draw.h 16x16 coverage; OVER or ADD. | |
| void | rmgui_draw_aa_line_to (rmgui_target_t *, rmgui_rect_t, rmgui_draw_point_t, rmgui_draw_point_t, int32_t, rmgui_draw_cap_t, rmgui_color_t, rmgui_draw_mode_t) |
| Q16 thick line with draw.h cap/coverage rules; OVER or ADD. | |
| void | rmgui_draw_aa_polygon_to (rmgui_target_t *, rmgui_rect_t, const rmgui_draw_point_t *, int, rmgui_color_t, rmgui_draw_mode_t) |
| Q16 convex polygon; RECORD snapshots points before returning. | |
| int | rmgui_draw_aa_contours_to (rmgui_target_t *, rmgui_rect_t, const rmgui_draw_vertex_t *, size_t, rmgui_draw_fill_rule_t, rmgui_color_t, rmgui_draw_mode_t, rmgui_draw_crossing_t *, size_t) |
| General contours; RECORD snapshots vertices, never caller intersections. | |
| void | rmgui_fb_blit_to (rmgui_target_t *, const rmgui_fb_t *, int, int) |
| Verbatim copy; RECORD pins the source through submit/discard. | |
| void | rmgui_fb_blit_scaled_to (rmgui_target_t *, const rmgui_fb_t *, int, int, int) |
| Integer magnified copy with fb.h sampling and source pinning. | |
| void | rmgui_fb_blit_stretch_to (rmgui_target_t *, const rmgui_fb_t *, rmgui_rect_t) |
| Corner-anchored nearest copy with fb.h sampling and source pinning. | |
| void | rmgui_fb_blit_filtered_to (rmgui_target_t *, const rmgui_fb_t *, rmgui_rect_t, rmgui_rect_t, rmgui_rect_t) |
| Filtered copy with fb.h alpha-weighted sampling and source pinning. | |
| void | rmgui_fb_blit_masked_to (rmgui_target_t *, const rmgui_fb_t *, rmgui_rect_t, rmgui_rect_t, rmgui_rect_t, rmgui_rect_t, int, rmgui_color_t) |
| Filtered tinted OVER through rounded coverage, matching fb.h. | |
| void | rmgui_fb_blit_shaped_to (rmgui_target_t *, const rmgui_fb_t *, rmgui_rect_t, rmgui_rect_t, rmgui_rect_t, const rmgui_mask_t *, rmgui_color_t) |
| Filtered tinted OVER through an A8 shape; pins source and shape. | |
| int | rmgui_draw_nine_patch_to (rmgui_target_t *, rmgui_rect_t, rmgui_rect_t, const rmgui_fb_t *, rmgui_rect_t, const rmgui_nine_patch_t *, int, rmgui_color_t) |
| Nine-region OVER matching image_fill.h; snapshot patch, pin sheet. | |
| int | rmgui_draw_tile_to (rmgui_target_t *, rmgui_rect_t, rmgui_rect_t, const rmgui_fb_t *, rmgui_rect_t, int, int, int, rmgui_color_t) |
| Repeated OVER matching image_fill.h; pin sheet. | |
| uint32_t | rmgui_target_find_glyph (const rmgui_target_t *, uint64_t, int, int) |
| Return a matching captured glyph resource or UINT32_MAX; no allocation. | |
| uint32_t | rmgui_target_mask (rmgui_target_t *, const rmgui_mask_t *) |
| Record a pinned caller-owned coverage mask; UINT32_MAX on exhaustion. | |
| void | rmgui_capture_to (rmgui_target_t *, rmgui_rect_t source, rmgui_fb_t *output) |
| Capture the current destination region into caller-owned RGBA output. | |
Explicit, bounded paint destinations.
CPU framebuffers retain their RGBA8 contract.
Override explicitly for packaged builds; default preserves debug diagnostics.
| #define RMGUI_VERIFY_PINNED_SOURCES 1 |
| #define RMGUI_TARGET_LAYER_DEPTH_MAX 32 |
Maximum active layer scopes, including the root.
Cycles and deeper trees fail before any destination write. LAYER is a first-class scope: its SUBSTREAM starts on transparent black, reads only its own destination and explicit ancestor capture imports, then composites into its parent with transform and opacity. The child remains sealed and immutable until parent submit/discard; scopes may nest to this bound.
Extension opcodes use array.offset for the corresponding value payload. All typed payloads and arrays are aligned to _Alignof(the element type), owned by the stream's caller, and checked completely before replay. All offsets are bytes from payload; no payload contains a host pointer. GRADIENT_LINEAR/RADIAL: gradient_args; flags bit 0 is OVER/ADD. STROKE/GLOW_ROUNDED: rounded_args; flags bit 0 is OVER/ADD. FRAME_SHADOW: shadow_args; rect is the inset/offset silhouette. LAYER_SHADOW: layer_shadow_args and SUBSTREAM resource, with the same scope semantics as LAYER; the shadow is composited below that scope. Flag bit 0 denotes an empty child: only the shadow is evaluated, with no child surface allocation or transparent-pixel composition. The empty SUBSTREAM is still acquired, validated and released normally. BACKDROP_RADIAL/NOISE: backdrop_args, palette_offset names 256 colors. BACKDROP_TILE: backdrop_tile_args, RGBA resource; flags bit 0 OVER/ADD. EMBOSS: emboss_args, resource is A8 mask. PARTICLES: particles_args, pool_offset names count particle values. MASK_FILL: basic.color, resource is A8 mask, rect is mask mapping. INVERT: rect intersect clip, bitwise complement of RGB; alpha unchanged. CAPTURE: rect is the source region; resource is a caller-owned writable RGBA framebuffer of exactly rect.w by rect.h. Out-of-destination pixels become transparent black. Capture is ordered and available only to later commands and descendant scopes consumed by later commands; output must not alias any storage, source or destination except explicit read-only imports. Record-mode page diagnostics must evaluate isolated CPU fixtures, not read an unfinished recorded frame.
Destination reads: all OVER/ADD commands read the covered destination (including backdrops, masks, emboss, particles, rounded strokes/glows, gradients, images, glyphs and layer composites). INVERT and CAPTURE explicitly read existing pixels. REPLACE, VGRAD and copy BLIT variants replace without reading destination. A GPU backend must preserve stream order and insert a destination-read barrier for INVERT/CAPTURE and any blend or glass implementation that samples an attachment rather than fixed-function blending. Glass/crack underlays are captured resources, not implicit reads across scope boundaries. Arbitrary hosted GL callbacks cannot be recorded; hosted mesh/orb surfaces must be supplied as immutable RGBA resources and recorded with COMPOSITE. Image-button frames, chart bars/legends and patterns decompose into these primitives; they introduce no additional stream opcode. NINE_SHADE/TILE_SHADE preserve image_fill.h sampling with a luminance ramp: blit.src identifies the source region, blit.extra references shade_args, resource pins the sheet. Two stops interpolate low/high; three interpolate low/middle/high at luminance 0/128/255. These commands read destination through straight OVER and preserve rect-relative sampling under clipping. CONIC_GRADIENT uses gradient_args: from is centre, to.x_q16 is the signed Q16-turn start angle, to.y_q16 is zero; stop count is positive. FILL_ROUNDED_CORNERS uses rounded_args with value zero. RECT_BORDER uses border_args. Both use flags OVER/ADD, no resource. NINE_FILTERED/TILE_FILTERED use the identical blit and value layouts as NINE/TILE, preserving alpha-weighted bilinear sampling under clipping.
| enum rmgui_target_op_t |
Primitive argument semantics are exactly those of the named CPU function.
CPU replay must be byte-identical to the corresponding CPU painters for the same initial destination, immutable sources, arguments and clipping. Opcode values 0..23 and their command/payload layouts are fixed; extensions append values without changing them. COUNT is not a replayable command. REPLACE is verbatim RGBA; RECT/PIXEL/HLINE/VLINE/OUTLINE/LINE are straight OVER; VGRAD is opaque replace. AA uses Q16 positions, 1/256-pixel rounding, 16x16 sample coverage and OVER/ADD from draw.h. BLIT variants preserve fb.h sampling, clipping, copy-versus-over and tint rules. NINE/TILE preserve image_fill.h's integer sampling and straight OVER. GLYPH is cached A8 OVER. LAYER is layer.h premultiplied OVER with the complete recorded transform. Every rectangle is in destination device pixels; clipping never rebases it.
Resource ownership: PINNED_RGBA/MASK headers and bytes must stay immutable and alive through submit/discard.
SNAPSHOT and GLYPH bytes live in payload. Glyph identity is (monotonic face generation, glyph index, pixel size), captured once; a reused font address never aliases an earlier face. SUBSTREAM and its caller-owned storage remain alive through parent submit. Debug builds (without NDEBUG) hash pinned pixels to detect mutation. In release builds rmgui__target_pinned_hash checks no pixels: this is a public release contract, not merely an optimization. Freed storage is never valid. Generation-stamped sources promise unchanged bytes for an unchanged stamp; mutation without a generation bump is deliberately undetected in release.
| Enumerator | |
|---|---|
| RMGUI_RESOURCE_PINNED_RGBA | |
| RMGUI_RESOURCE_PINNED_MASK | |
| RMGUI_RESOURCE_SNAPSHOT_RGBA | |
| RMGUI_RESOURCE_GLYPH | |
| RMGUI_RESOURCE_SUBSTREAM | |
| RMGUI_RESOURCE_CAPTURE_RGBA | |
| rmgui_target_t rmgui_target_cpu | ( | rmgui_fb_t * | fb | ) |
Wrap a valid CPU framebuffer, preserving all existing primitive semantics.
| rmgui_target_t rmgui_target_record | ( | rmgui_draw_stream_t * | stream, |
| int | width, | ||
| int | height ) |
Bind empty caller-owned bounded storage to an extent.
Submit requires the same destination dimensions; mismatches reject atomically with INVALID.
| void rmgui_target_refuse | ( | rmgui_target_t * | target, |
| const char * | operation ) |
Latch an explicit unsupported operation; CPU targets are unchanged.
operation must refer to static-lifetime text retained through discard.
| rmgui_target_status_t rmgui_target_finish | ( | rmgui_draw_stream_t * | stream | ) |
Seal once and report the first failure; error releases resources.
| void rmgui_target_discard | ( | rmgui_draw_stream_t * | stream | ) |
Cancel every resource and reset counts/status for explicit retry.
| rmgui_target_status_t rmgui_target_submit | ( | rmgui_draw_stream_t * | stream, |
| rmgui_fb_t * | destination, | ||
| void * | scratch, | ||
| size_t | scratch_capacity ) |
Validate all resources, commands and replay destinations before any writes; replay once and release resources.
Invalid commands return INVALID. scratch is caller-owned replay-only RGBA storage for nested layers; its capacity must hold the sum of simultaneously active layer surface bytes and 64*64*4 bytes for each simultaneously active shadowed scope. It must not overlap destination pixels, immutable stream storage or pinned sources. Destination overlap is rejected with INVALID before any writes.
| rmgui_draw_command_t * rmgui_target_command | ( | rmgui_target_t * | target, |
| rmgui_target_op_t | op ) |
Append a value command; returns NULL and latches capacity/state on failure.
| size_t rmgui_target_payload | ( | rmgui_target_t * | target, |
| const void * | bytes, | ||
| size_t | size, | ||
| size_t | alignment ) |
Reserve aligned payload; SIZE_MAX on exhaustion.
alignment is a power of 2.
| uint32_t rmgui_target_source | ( | rmgui_target_t * | target, |
| const rmgui_fb_t * | source, | ||
| int | snapshot ) |
Pin a caller source, or snapshot transient RGBA bytes; UINT32_MAX on error.
| uint32_t rmgui_target_source_stamped | ( | rmgui_target_t * | , |
| const rmgui_fb_t * | , | ||
| const rmgui_source_stamp_t * | ) |
Declare a generation-stamped pin before any painter first uses this source.
Existing *_to painters (including image/composite/mask/effects) reuse this resource. Registration consumes one ordinary resource slot; no allocation. NULL/zero stamps, conflicting re-registration, or registration after an unstamped first use latch INVALID. Equal registration is idempotent. Native residency retains the stamp only in the caller-configured bounded image/mask slots; eviction causes one rehash/upload when next encountered. NDEBUG native frames compare stamps without reading unchanged source bytes. Debug frames retain full content checks, including unannounced mutations.
| uint32_t rmgui_target_mask_stamped | ( | rmgui_target_t * | , |
| const rmgui_mask_t * | , | ||
| const rmgui_source_stamp_t * | ) |
| uint32_t rmgui_target_glyph | ( | rmgui_target_t * | target, |
| uint64_t | face_generation, | ||
| int | glyph, | ||
| int | pixel_size, | ||
| const unsigned char * | coverage, | ||
| int | width, | ||
| int | height, | ||
| int | stride, | ||
| int | xoff, | ||
| int | yoff ) |
Capture unique strided A8 coverage immediately; no cache pointer is retained.
| void rmgui_fb_clear_to | ( | rmgui_target_t * | , |
| rmgui_color_t | ) |
Verbatim clear over the target extent; failure latches for RECORD.
| void rmgui_fb_fill_rect_to | ( | rmgui_target_t * | , |
| rmgui_rect_t | , | ||
| rmgui_color_t | ) |
Verbatim clipped fill, matching rmgui_fb_fill_rect.
| void rmgui_draw_pixel_to | ( | rmgui_target_t * | , |
| int | , | ||
| int | , | ||
| rmgui_color_t | ) |
Straight-over pixel, matching rmgui_draw_pixel.
| void rmgui_draw_hline_to | ( | rmgui_target_t * | , |
| int | , | ||
| int | , | ||
| int | , | ||
| rmgui_color_t | ) |
Straight-over horizontal run, matching rmgui_draw_hline.
| void rmgui_draw_vline_to | ( | rmgui_target_t * | , |
| int | , | ||
| int | , | ||
| int | , | ||
| rmgui_color_t | ) |
Straight-over vertical run, matching rmgui_draw_vline.
| void rmgui_draw_rect_to | ( | rmgui_target_t * | , |
| rmgui_rect_t | , | ||
| rmgui_color_t | ) |
Straight-over outline with draw.h corner ownership.
| void rmgui_draw_fill_rect_to | ( | rmgui_target_t * | , |
| rmgui_rect_t | , | ||
| rmgui_color_t | ) |
Straight-over clipped fill, matching rmgui_draw_fill_rect.
| void rmgui_draw_fill_rounded_to | ( | rmgui_target_t * | , |
| rmgui_rect_t | , | ||
| int | , | ||
| rmgui_color_t | ) |
Integer-isqrt rounded fill, matching rmgui_draw_fill_rounded.
| void rmgui_draw_line_to | ( | rmgui_target_t * | , |
| int | , | ||
| int | , | ||
| int | , | ||
| int | , | ||
| rmgui_color_t | ) |
Inclusive Bresenham line with draw.h half-toward-start rounding.
| void rmgui_draw_vgrad_to | ( | rmgui_target_t * | , |
| rmgui_rect_t | , | ||
| const rmgui_draw_vgrad_stop_t * | , | ||
| int | ) |
Opaque vertical gradient; RECORD snapshots the stop array before return.
| void rmgui_draw_bevel_raised_to | ( | rmgui_target_t * | , |
| rmgui_rect_t | , | ||
| rmgui_color_t | , | ||
| rmgui_color_t | ) |
Opaque raised bevel with draw.h edge ownership.
| void rmgui_draw_bevel_recessed_to | ( | rmgui_target_t * | , |
| rmgui_rect_t | , | ||
| rmgui_color_t | , | ||
| rmgui_color_t | ) |
Opaque recessed bevel with draw.h edge ownership.
| void rmgui_draw_aa_disc_to | ( | rmgui_target_t * | , |
| rmgui_rect_t | , | ||
| rmgui_draw_point_t | , | ||
| int32_t | , | ||
| rmgui_color_t | , | ||
| rmgui_draw_mode_t | ) |
Q16 disc, explicit clip and draw.h 16x16 coverage; OVER or ADD.
| void rmgui_draw_aa_ring_to | ( | rmgui_target_t * | , |
| rmgui_rect_t | , | ||
| rmgui_draw_point_t | , | ||
| int32_t | , | ||
| int32_t | , | ||
| rmgui_color_t | , | ||
| rmgui_draw_mode_t | ) |
Q16 ring, explicit clip and draw.h 16x16 coverage; OVER or ADD.
| void rmgui_draw_aa_line_to | ( | rmgui_target_t * | , |
| rmgui_rect_t | , | ||
| rmgui_draw_point_t | , | ||
| rmgui_draw_point_t | , | ||
| int32_t | , | ||
| rmgui_draw_cap_t | , | ||
| rmgui_color_t | , | ||
| rmgui_draw_mode_t | ) |
Q16 thick line with draw.h cap/coverage rules; OVER or ADD.
| void rmgui_draw_aa_polygon_to | ( | rmgui_target_t * | , |
| rmgui_rect_t | , | ||
| const rmgui_draw_point_t * | , | ||
| int | , | ||
| rmgui_color_t | , | ||
| rmgui_draw_mode_t | ) |
Q16 convex polygon; RECORD snapshots points before returning.
| int rmgui_draw_aa_contours_to | ( | rmgui_target_t * | , |
| rmgui_rect_t | , | ||
| const rmgui_draw_vertex_t * | , | ||
| size_t | , | ||
| rmgui_draw_fill_rule_t | , | ||
| rmgui_color_t | , | ||
| rmgui_draw_mode_t | , | ||
| rmgui_draw_crossing_t * | , | ||
| size_t | ) |
General contours; RECORD snapshots vertices, never caller intersections.
Submit scratch supplies intersections. Return 0 or -1, latching failures.
| void rmgui_fb_blit_to | ( | rmgui_target_t * | , |
| const rmgui_fb_t * | , | ||
| int | , | ||
| int | ) |
Verbatim copy; RECORD pins the source through submit/discard.
| void rmgui_fb_blit_scaled_to | ( | rmgui_target_t * | , |
| const rmgui_fb_t * | , | ||
| int | , | ||
| int | , | ||
| int | ) |
Integer magnified copy with fb.h sampling and source pinning.
| void rmgui_fb_blit_stretch_to | ( | rmgui_target_t * | , |
| const rmgui_fb_t * | , | ||
| rmgui_rect_t | ) |
Corner-anchored nearest copy with fb.h sampling and source pinning.
| void rmgui_fb_blit_filtered_to | ( | rmgui_target_t * | , |
| const rmgui_fb_t * | , | ||
| rmgui_rect_t | , | ||
| rmgui_rect_t | , | ||
| rmgui_rect_t | ) |
Filtered copy with fb.h alpha-weighted sampling and source pinning.
| void rmgui_fb_blit_masked_to | ( | rmgui_target_t * | , |
| const rmgui_fb_t * | , | ||
| rmgui_rect_t | , | ||
| rmgui_rect_t | , | ||
| rmgui_rect_t | , | ||
| rmgui_rect_t | , | ||
| int | , | ||
| rmgui_color_t | ) |
Filtered tinted OVER through rounded coverage, matching fb.h.
| void rmgui_fb_blit_shaped_to | ( | rmgui_target_t * | , |
| const rmgui_fb_t * | , | ||
| rmgui_rect_t | , | ||
| rmgui_rect_t | , | ||
| rmgui_rect_t | , | ||
| const rmgui_mask_t * | , | ||
| rmgui_color_t | ) |
Filtered tinted OVER through an A8 shape; pins source and shape.
| int rmgui_draw_nine_patch_to | ( | rmgui_target_t * | , |
| rmgui_rect_t | , | ||
| rmgui_rect_t | , | ||
| const rmgui_fb_t * | , | ||
| rmgui_rect_t | , | ||
| const rmgui_nine_patch_t * | , | ||
| int | , | ||
| rmgui_color_t | ) |
Nine-region OVER matching image_fill.h; snapshot patch, pin sheet.
Return 0 or -1; bounded-record failures also latch on the stream.
| int rmgui_draw_tile_to | ( | rmgui_target_t * | , |
| rmgui_rect_t | , | ||
| rmgui_rect_t | , | ||
| const rmgui_fb_t * | , | ||
| rmgui_rect_t | , | ||
| int | , | ||
| int | , | ||
| int | , | ||
| rmgui_color_t | ) |
Repeated OVER matching image_fill.h; pin sheet.
Return 0 or -1, with bounded-record failures also latched on the stream.
| uint32_t rmgui_target_find_glyph | ( | const rmgui_target_t * | , |
| uint64_t | , | ||
| int | , | ||
| int | ) |
Return a matching captured glyph resource or UINT32_MAX; no allocation.
| uint32_t rmgui_target_mask | ( | rmgui_target_t * | , |
| const rmgui_mask_t * | ) |
Record a pinned caller-owned coverage mask; UINT32_MAX on exhaustion.
| void rmgui_capture_to | ( | rmgui_target_t * | , |
| rmgui_rect_t | source, | ||
| rmgui_fb_t * | output ) |
Capture the current destination region into caller-owned RGBA output.
output dimensions must equal source extent and remain fixed through submit/discard. RECORD performs no immediate pixel writes or reads; capture executes in stream order during submit and may feed later image commands. Invalid geometry/alias/storage latches INVALID atomically.