139 float *wx,
float *wy);
173 float distance_percent,
192 float distance_percent,
232 float x,
float y, gboolean have_pickup);
237 int origin_x,
int origin_y,
int width
Definition bilateral.h:1
int height
Definition bilateral.h:1
Dab-level brush rasterization API for drawlayer.
typedef void((*dt_cache_allocate_t)(void *userdata, dt_cache_entry_t *entry))
void dt_drawlayer_paint_path_state_reset(dt_drawlayer_paint_stroke_t *state)
Reset stroke path state and pending raw queue for a new stroke.
Definition iop/drawlayer/paint.c:476
void dt_drawlayer_paint_runtime_state_destroy(dt_drawlayer_damaged_rect_t **state)
Destroy stroke-damage accumulator state and null pointer.
Definition iop/drawlayer/paint.c:821
gboolean dt_drawlayer_paint_queue_raw_input(dt_drawlayer_paint_stroke_t *state, const dt_drawlayer_paint_raw_input_t *input)
Queue one raw input event (FIFO).
Definition iop/drawlayer/paint.c:649
void dt_drawlayer_paint_runtime_private_destroy(dt_drawlayer_paint_stroke_t **state)
Destroy stroke runtime payload and null pointer.
Definition iop/drawlayer/paint.c:845
void dt_drawlayer_paint_runtime_set_stroke_seed(dt_drawlayer_paint_stroke_t *state, uint64_t seed)
Set deterministic stroke seed for noise-derived effects.
Definition iop/drawlayer/paint.c:864
uint64_t dt_drawlayer_paint_runtime_get_stroke_seed(const dt_drawlayer_paint_stroke_t *state)
Get current deterministic stroke seed.
Definition iop/drawlayer/paint.c:870
void dt_drawlayer_paint_interpolate_path(dt_drawlayer_paint_stroke_t *state, const dt_drawlayer_paint_callbacks_t *callbacks, void *user_data)
Drain queued raw input events and append evenly spaced dabs to state->pending_dabs.
Definition iop/drawlayer/paint.c:673
float * dt_drawlayer_paint_runtime_smudge_pixels(dt_drawlayer_paint_stroke_t *state)
Get smudge carry buffer pointer (RGBA float).
Definition iop/drawlayer/paint.c:890
int dt_drawlayer_paint_runtime_smudge_height(const dt_drawlayer_paint_stroke_t *state)
Get smudge carry buffer height.
Definition iop/drawlayer/paint.c:900
gboolean dt_drawlayer_paint_runtime_have_smudge_pickup(const dt_drawlayer_paint_stroke_t *state)
Query whether smudge pickup coordinates are initialized.
Definition iop/drawlayer/paint.c:905
gboolean dt_drawlayer_paint_runtime_prepare_dab_context(dt_drawlayer_paint_stroke_t *state, const dt_drawlayer_brush_dab_t *dab, int width, int height, int origin_x, int origin_y, float scale)
Compute current dab footprint bounds in target buffer coordinates.
Definition iop/drawlayer/paint.c:926
void dt_drawlayer_paint_runtime_private_reset(dt_drawlayer_paint_stroke_t *state)
Reset transient stroke runtime payload between strokes.
Definition iop/drawlayer/paint.c:853
void(* dt_drawlayer_paint_stroke_seed_cb)(void *user_data, uint64_t stroke_seed)
Notify caller when a new stroke seed is started.
Definition iop/drawlayer/paint.h:143
void dt_drawlayer_paint_runtime_get_smudge_pickup(const dt_drawlayer_paint_stroke_t *state, float *x, float *y)
Read smudge pickup coordinates.
Definition iop/drawlayer/paint.c:910
dt_drawlayer_paint_stroke_pos_t
Position of a raw input event inside a stroke lifecycle.
Definition iop/drawlayer/paint.h:36
@ DT_DRAWLAYER_PAINT_STROKE_MIDDLE
Definition iop/drawlayer/paint.h:38
@ DT_DRAWLAYER_PAINT_STROKE_FIRST
Definition iop/drawlayer/paint.h:37
@ DT_DRAWLAYER_PAINT_STROKE_END
Definition iop/drawlayer/paint.h:39
gboolean dt_drawlayer_paint_raster_path(const GArray *dabs, float distance_percent, dt_drawlayer_cache_patch_t *patch, float scale, dt_drawlayer_cache_patch_t *stroke_mask, dt_drawlayer_damaged_rect_t *runtime_state, dt_drawlayer_paint_stroke_t *runtime_private)
Rasterize a precomputed dab list into one float RGBA patch.
Definition iop/drawlayer/paint.c:691
void dt_drawlayer_paint_runtime_set_smudge_pickup(dt_drawlayer_paint_stroke_t *state, float x, float y, gboolean have_pickup)
Write smudge pickup coordinates and validity flag.
Definition iop/drawlayer/paint.c:917
int dt_drawlayer_paint_runtime_smudge_width(const dt_drawlayer_paint_stroke_t *state)
Get smudge carry buffer width.
Definition iop/drawlayer/paint.c:895
gboolean dt_drawlayer_paint_runtime_get_stroke_damage(const dt_drawlayer_damaged_rect_t *state, dt_drawlayer_damaged_rect_t *out_rect)
Read accumulated stroke damage rectangle.
Definition iop/drawlayer/paint.c:965
gboolean dt_drawlayer_paint_runtime_ensure_smudge_pixels(dt_drawlayer_paint_stroke_t *state, int width, int height)
Ensure smudge carry buffer allocation for given footprint dimensions.
Definition iop/drawlayer/paint.c:875
gboolean(* dt_drawlayer_paint_layer_to_widget_cb)(void *user_data, float lx, float ly, float *wx, float *wy)
Convert layer-space coordinates back to widget-space (for HUD/preview alignment).
Definition iop/drawlayer/paint.h:138
gboolean(* dt_drawlayer_paint_build_dab_cb)(void *user_data, dt_drawlayer_paint_stroke_t *state, const dt_drawlayer_paint_raw_input_t *input, dt_drawlayer_brush_dab_t *out_dab)
Build a resolved dab from one raw input event.
Definition iop/drawlayer/paint.h:133
void dt_drawlayer_paint_runtime_state_reset(dt_drawlayer_damaged_rect_t *state)
Reset stroke-damage accumulator to empty/invalid.
Definition iop/drawlayer/paint.c:827
void(* dt_drawlayer_paint_emit_dab_cb)(void *user_data, const dt_drawlayer_brush_dab_t *dab)
Consume one emitted dab sample from path processing.
Definition iop/drawlayer/paint.h:141
void dt_drawlayer_paint_runtime_note_dab_damage(dt_drawlayer_damaged_rect_t *state, const dt_drawlayer_damaged_rect_t *dab_rect)
Merge one dab rectangle into an accumulator rectangle.
Definition iop/drawlayer/paint.c:947
dt_drawlayer_damaged_rect_t * dt_drawlayer_paint_runtime_state_create(void)
Allocate zero-initialized stroke-damage accumulator state.
Definition iop/drawlayer/paint.c:813
void dt_drawlayer_paint_finalize_path(dt_drawlayer_paint_stroke_t *state, const dt_drawlayer_paint_callbacks_t *callbacks, void *user_data)
Force emission of a pending initial dab when a stroke had no emitted samples yet.
Definition iop/drawlayer/paint.c:529
gboolean dt_drawlayer_paint_rasterize_segment_to_buffer(const dt_drawlayer_brush_dab_t *dab, float distance_percent, dt_drawlayer_cache_patch_t *patch, float scale, dt_drawlayer_cache_patch_t *stroke_mask, dt_drawlayer_damaged_rect_t *runtime_state, dt_drawlayer_paint_stroke_t *runtime_private)
Replay one emitted dab segment into a float buffer through brush API.
Definition iop/drawlayer/paint.c:741
gboolean dt_drawlayer_paint_merge_runtime_stroke_damage(dt_drawlayer_damaged_rect_t *path_state, dt_drawlayer_damaged_rect_t *target_rect)
Merge path-state damage into target rectangle and clear path-state accumulator.
Definition iop/drawlayer/paint.c:992
dt_drawlayer_paint_stroke_t * dt_drawlayer_paint_runtime_private_create(void)
Allocate stroke runtime payload object used by paint+brush internals.
Definition iop/drawlayer/paint.c:837
static const float x
Definition iop_profile.h:239
unsigned __int64 uint64_t
Definition strptime.c:74
Fully resolved input dab descriptor.
Definition brush.h:66
Generic float RGBA patch stored either in malloc memory or pixel cache.
Definition iop/drawlayer/cache.h:37
Integer axis-aligned rectangle in buffer coordinates.
Definition iop/drawlayer/paint.h:87
int se[2]
Definition iop/drawlayer/paint.h:90
int nw[2]
Definition iop/drawlayer/paint.h:89
gboolean valid
Definition iop/drawlayer/paint.h:88
Callback bundle used by stroke processing entry points.
Definition iop/drawlayer/paint.h:147
dt_drawlayer_paint_emit_dab_cb emit_dab
Definition iop/drawlayer/paint.h:150
dt_drawlayer_paint_build_dab_cb build_dab
Definition iop/drawlayer/paint.h:148
dt_drawlayer_paint_stroke_seed_cb on_stroke_seed
Definition iop/drawlayer/paint.h:151
dt_drawlayer_paint_layer_to_widget_cb layer_to_widget
Definition iop/drawlayer/paint.h:149
Mutable stroke runtime state owned by worker/backend code.
Definition iop/drawlayer/paint.h:100
GArray * pending_dabs
Definition iop/drawlayer/paint.h:103
gboolean have_prev_raw_dab
Definition iop/drawlayer/paint.h:109
float stroke_arc_length
Definition iop/drawlayer/paint.h:110
dt_drawlayer_damaged_rect_t bounds
Definition iop/drawlayer/paint.h:114
float * smudge_pixels
Definition iop/drawlayer/paint.h:115
GArray * history
Definition iop/drawlayer/paint.h:101
dt_drawlayer_brush_dab_t prev_raw_dab
Definition iop/drawlayer/paint.h:108
int smudge_width
Definition iop/drawlayer/paint.h:116
float smudge_pickup_x
Definition iop/drawlayer/paint.h:118
gboolean have_smudge_pickup
Definition iop/drawlayer/paint.h:120
float distance_percent
Definition iop/drawlayer/paint.h:112
dt_drawlayer_brush_dab_t last_input_dab
Definition iop/drawlayer/paint.h:106
float sampled_arc_length
Definition iop/drawlayer/paint.h:111
GArray * raw_inputs
Definition iop/drawlayer/paint.h:102
uint64_t stroke_seed
Definition iop/drawlayer/paint.h:113
GArray * dab_window
Definition iop/drawlayer/paint.h:105
guint raw_input_cursor
Definition iop/drawlayer/paint.h:104
gboolean have_last_input_dab
Definition iop/drawlayer/paint.h:107
float smudge_pickup_y
Definition iop/drawlayer/paint.h:119
int smudge_height
Definition iop/drawlayer/paint.h:117