|
RMGui 0.15.0
C11 retained-mode UI library: layout kernel, style schema, widget painters, fonts, software framebuffer
|
#include "draw_target.h"Data Structures | |
| struct | rmgui_composite_source_t |
| An immutable image, or a same-kind isolated child target. More... | |
| struct | rmgui_blur_desc_t |
| Gaussian and final composite parameters. More... | |
| struct | rmgui_target_blur_args_t |
| IMAGE_BLUR/BACKDROP_BLUR use existing blit.src/tint/extra and rect/clip. More... | |
Functions | |
| size_t | rmgui_blur_scratch_size (int width, int height, float sigma) |
| Required CPU work bytes for a nonempty width*height ROI: sigma=0 needs 4*N; otherwise N*(4+4*sizeof(double)) + sizeof(double)*(ceil(3*sigma)+1). | |
| int | rmgui_image_blur_to (rmgui_target_t *target, const rmgui_composite_source_t *source, const rmgui_blur_desc_t *desc, void *scratch, size_t scratch_capacity) |
| Blur an immutable image or isolated child, then composite. | |
| int | rmgui_backdrop_blur_to (rmgui_target_t *target, const rmgui_blur_desc_t *desc, void *scratch, size_t scratch_capacity) |
| Snapshot source_rect from the current destination at this painter-order position, blur and composite. | |
| size_t rmgui_blur_scratch_size | ( | int | width, |
| int | height, | ||
| float | sigma ) |
Required CPU work bytes for a nonempty width*height ROI: sigma=0 needs 4*N; otherwise N*(4+4*sizeof(double)) + sizeof(double)*(ceil(3*sigma)+1).
SIZE_MAX means invalid dimensions, sigma/support overflow or size overflow. No alignment required. Scratch must be disjoint from destination/source pixels and headers, shape bytes/header, descriptor and target. No allocation or retained scratch.
| int rmgui_image_blur_to | ( | rmgui_target_t * | target, |
| const rmgui_composite_source_t * | source, | ||
| const rmgui_blur_desc_t * | desc, | ||
| void * | scratch, | ||
| size_t | scratch_capacity ) |
Blur an immutable image or isolated child, then composite.
CPU uses caller scratch; RECORD ignores scratch and acquires immutable resources instead. Returns 0 on success, -1 on invalid input/capacity/record failure. A failure never changes destination pixels; RECORD latches refusal/capacity and no prefix can replay. A failed record may seal, but never acquires, a child. Replay scratch needs child surface bytes plus the maximum (not sum) of child nested scratch and blur work bytes; without a child, only blur work.
| int rmgui_backdrop_blur_to | ( | rmgui_target_t * | target, |
| const rmgui_blur_desc_t * | desc, | ||
| void * | scratch, | ||
| size_t | scratch_capacity ) |
Snapshot source_rect from the current destination at this painter-order position, blur and composite.
Never reads across an isolated scope. CPU uses caller scratch; RECORD uses submit scratch. Return/failure, mapping, mask and ownership rules are identical to rmgui_image_blur_to.