Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
paint.c File Reference

Stroke-level path processing and raster dispatch for drawlayer. More...

#include "iop/drawlayer/paint.h"
#include "iop/drawlayer/cache.h"
#include "iop/drawlayer/brush_profile.h"
#include "common/darktable.h"
#include "common/math.h"
#include "develop/noise_generator.h"
#include <string.h>
+ Include dependency graph for iop/drawlayer/paint.c:

Functions

static float _clamp01 (const float v)
 Clamp scalar value to [0, 1].
 
static float _lerpf (const float a, const float b, const float t)
 Linear interpolation helper.
 
static float _paint_voronoi_strip_angle_measure (const float rho, const float strip_ratio)
 Compute angular measure used by strip-based profile integration.
 
static float _paint_dab_sample_spacing (const dt_drawlayer_brush_dab_t *dab, const float distance_percent)
 Resolve dab-to-dab center spacing from radius and distance percentage.
 
static float _paint_segment_sample_spacing (const dt_drawlayer_brush_dab_t *dabs, const int count, const float distance_percent)
 Resolve one segment spacing target from edge dab radii.
 
static float _paint_cubic_hermitef (const float p0, const float p1, const float m0, const float m1, const float t)
 Cubic Hermite scalar interpolation helper.
 
static dt_drawlayer_brush_dab_t _paint_build_segment_window_sample (const dt_drawlayer_brush_dab_t *dabs, const int count, const float t)
 Build one interpolated dab sample in the current segment window.
 
static float _paint_stroke_sample_opacity_scale (const dt_drawlayer_brush_dab_t *dab, const float sample_step)
 Compute per-sample opacity normalization from spacing.
 
static gboolean _ensure_raw_inputs (dt_drawlayer_paint_stroke_t *state)
 Lazily allocate raw-input queue storage for one stroke state.
 
static gboolean _ensure_pending_dabs (dt_drawlayer_paint_stroke_t *state)
 Lazily allocate pending-dab batch storage for one stroke state.
 
static dt_drawlayer_brush_dab_t _sample_raw_segment_cubic_param (const dt_drawlayer_paint_stroke_t *state, const dt_drawlayer_brush_dab_t *segment_start, const dt_drawlayer_brush_dab_t *segment_end, const float t)
 Sample the current raw segment at parametric position t.
 
static void _build_raw_segment_cubic_arclen_lut (const dt_drawlayer_paint_stroke_t *state, const dt_drawlayer_brush_dab_t *segment_start, const dt_drawlayer_brush_dab_t *segment_end, float *cumulative, const int segments, float *total_len)
 Build arc-length lookup for the current cubic segment.
 
static dt_drawlayer_brush_dab_t _sample_raw_segment_cubic_arclen (const dt_drawlayer_paint_stroke_t *state, const dt_drawlayer_brush_dab_t *segment_start, const dt_drawlayer_brush_dab_t *segment_end, const float target_norm, const float *cumulative, const int segments, const float total_len)
 Sample a cubic segment at normalized arc length using LUT inversion.
 
static void _apply_quadratic_dab_smoothing (dt_drawlayer_paint_stroke_t *state, dt_drawlayer_brush_dab_t *dab, const float sample_spacing, const float smoothing_percent, const dt_drawlayer_paint_layer_to_widget_cb layer_to_widget, void *user_data)
 Apply optional quadratic smoothing to one emitted dab.
 
static void _emit_dab (dt_drawlayer_paint_stroke_t *state, dt_drawlayer_brush_dab_t *dab)
 Emit one dab and append it to emitted-history tracking.
 
static void _freeze_emitted_dab_raster_state (dt_drawlayer_brush_dab_t *dab, const float sample_spacing)
 Freeze raster-time normalization into one emitted dab record.
 
static void _enforce_dab_center_spacing (dt_drawlayer_paint_stroke_t *state, dt_drawlayer_brush_dab_t *dab, const float sample_spacing, const dt_drawlayer_paint_layer_to_widget_cb layer_to_widget, void *user_data)
 Re-project current dab center to exact target spacing from previous dab.
 
static void _paint_reset_path_runtime_state (dt_drawlayer_paint_stroke_t *state)
 Reset only path-generation state while keeping reusable allocations.
 
void dt_drawlayer_paint_path_state_reset (dt_drawlayer_paint_stroke_t *state)
 Reset full stroke state including queued raw input events.
 
static gboolean _paint_input_starts_new_stroke (const dt_drawlayer_paint_stroke_t *state, const dt_drawlayer_paint_raw_input_t *input)
 Test if current input denotes a new stroke boundary.
 
static uint64_t _paint_make_stroke_seed (const dt_drawlayer_paint_raw_input_t *input)
 Build deterministic stroke seed from batch/time/coordinates.
 
static void _emit_first_sample_if_needed (dt_drawlayer_paint_stroke_t *state, const dt_drawlayer_brush_dab_t *dab, const dt_drawlayer_paint_callbacks_t *callbacks, void *user_data)
 Optionally emit first sample immediately when stroke starts.
 
void dt_drawlayer_paint_finalize_path (dt_drawlayer_paint_stroke_t *state, const dt_drawlayer_paint_callbacks_t *callbacks, void *user_data)
 Finalize stroke by force-emitting the pending first sample if needed.
 
static void _flush_pending_initial_if_needed (dt_drawlayer_paint_stroke_t *state, const dt_drawlayer_brush_dab_t *dab, const dt_drawlayer_paint_callbacks_t *callbacks, void *user_data)
 Flush deferred initial dab before regular segment emission starts.
 
static void _paint_process_one_raw_input (dt_drawlayer_paint_stroke_t *state, const dt_drawlayer_paint_raw_input_t *input, const dt_drawlayer_paint_callbacks_t *callbacks, void *user_data)
 Process one raw input event into zero or more emitted dabs.
 
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).
 
static void _paint_compact_raw_input_queue (dt_drawlayer_paint_stroke_t *state)
 
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.
 
gboolean dt_drawlayer_paint_raster_path (const GArray *dabs, const float distance_percent, dt_drawlayer_cache_patch_t *patch, const 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.
 
static void _advance_smudge_pickup_state (dt_drawlayer_paint_stroke_t *state, const dt_drawlayer_brush_dab_t *current, const dt_drawlayer_brush_dab_t *previous)
 
gboolean dt_drawlayer_paint_rasterize_segment_to_buffer (const dt_drawlayer_brush_dab_t *dab, const float distance_percent, dt_drawlayer_cache_patch_t *patch, const 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.
 
dt_drawlayer_damaged_rect_tdt_drawlayer_paint_runtime_state_create (void)
 Allocate zero-initialized stroke-damage accumulator state.
 
void dt_drawlayer_paint_runtime_state_destroy (dt_drawlayer_damaged_rect_t **state)
 Destroy stroke-damage accumulator state and null pointer.
 
void dt_drawlayer_paint_runtime_state_reset (dt_drawlayer_damaged_rect_t *state)
 Reset stroke-damage accumulator to empty/invalid.
 
dt_drawlayer_paint_stroke_tdt_drawlayer_paint_runtime_private_create (void)
 Allocate stroke runtime payload object used by paint+brush internals.
 
void dt_drawlayer_paint_runtime_private_destroy (dt_drawlayer_paint_stroke_t **state)
 Destroy stroke runtime payload and null pointer.
 
void dt_drawlayer_paint_runtime_private_reset (dt_drawlayer_paint_stroke_t *state)
 Reset transient stroke runtime payload between strokes.
 
void dt_drawlayer_paint_runtime_set_stroke_seed (dt_drawlayer_paint_stroke_t *state, const uint64_t seed)
 Set deterministic stroke seed for noise-derived effects.
 
uint64_t dt_drawlayer_paint_runtime_get_stroke_seed (const dt_drawlayer_paint_stroke_t *state)
 Get current deterministic stroke seed.
 
gboolean dt_drawlayer_paint_runtime_ensure_smudge_pixels (dt_drawlayer_paint_stroke_t *state, const int width, const int height)
 Ensure smudge carry buffer allocation for given footprint dimensions.
 
float * dt_drawlayer_paint_runtime_smudge_pixels (dt_drawlayer_paint_stroke_t *state)
 Get smudge carry buffer pointer (RGBA float).
 
int dt_drawlayer_paint_runtime_smudge_width (const dt_drawlayer_paint_stroke_t *state)
 Get smudge carry buffer width.
 
int dt_drawlayer_paint_runtime_smudge_height (const dt_drawlayer_paint_stroke_t *state)
 Get smudge carry buffer height.
 
gboolean dt_drawlayer_paint_runtime_have_smudge_pickup (const dt_drawlayer_paint_stroke_t *state)
 Query whether smudge pickup coordinates are initialized.
 
void dt_drawlayer_paint_runtime_get_smudge_pickup (const dt_drawlayer_paint_stroke_t *state, float *x, float *y)
 Read smudge pickup coordinates.
 
void dt_drawlayer_paint_runtime_set_smudge_pickup (dt_drawlayer_paint_stroke_t *state, const float x, const float y, const gboolean have_pickup)
 Write smudge pickup coordinates and validity flag.
 
gboolean dt_drawlayer_paint_runtime_prepare_dab_context (dt_drawlayer_paint_stroke_t *state, const dt_drawlayer_brush_dab_t *dab, const int width, const int height, const int origin_x, const int origin_y, const float scale)
 Compute current dab footprint bounds in target buffer coordinates.
 
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.
 
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.
 
static void _paint_union_damage_rect (dt_drawlayer_damaged_rect_t *rect, const dt_drawlayer_damaged_rect_t *add_rect)
 
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.
 

Detailed Description

Stroke-level path processing and raster dispatch for drawlayer.

Function Documentation

◆ _advance_smudge_pickup_state()

◆ _apply_quadratic_dab_smoothing()

◆ _build_raw_segment_cubic_arclen_lut()

static void _build_raw_segment_cubic_arclen_lut ( const dt_drawlayer_paint_stroke_t state,
const dt_drawlayer_brush_dab_t segment_start,
const dt_drawlayer_brush_dab_t segment_end,
float *  cumulative,
const int  segments,
float *  total_len 
)
static

Build arc-length lookup for the current cubic segment.

Precondition
cumulative must contain segments + 1 items.

References _sample_raw_segment_cubic_param(), i, t, dt_drawlayer_brush_dab_t::x, and dt_drawlayer_brush_dab_t::y.

Referenced by _paint_process_one_raw_input().

◆ _clamp01()

◆ _emit_dab()

◆ _emit_first_sample_if_needed()

◆ _enforce_dab_center_spacing()

static void _enforce_dab_center_spacing ( dt_drawlayer_paint_stroke_t state,
dt_drawlayer_brush_dab_t dab,
const float  sample_spacing,
const dt_drawlayer_paint_layer_to_widget_cb  layer_to_widget,
void user_data 
)
static

◆ _ensure_pending_dabs()

static gboolean _ensure_pending_dabs ( dt_drawlayer_paint_stroke_t state)
static

Lazily allocate pending-dab batch storage for one stroke state.

References FALSE, dt_drawlayer_paint_stroke_t::pending_dabs, and TRUE.

Referenced by _emit_first_sample_if_needed(), _paint_process_one_raw_input(), and dt_drawlayer_paint_finalize_path().

◆ _ensure_raw_inputs()

static gboolean _ensure_raw_inputs ( dt_drawlayer_paint_stroke_t state)
static

Lazily allocate raw-input queue storage for one stroke state.

References FALSE, dt_drawlayer_paint_stroke_t::raw_inputs, and TRUE.

Referenced by dt_drawlayer_paint_queue_raw_input().

◆ _flush_pending_initial_if_needed()

static void _flush_pending_initial_if_needed ( dt_drawlayer_paint_stroke_t state,
const dt_drawlayer_brush_dab_t dab,
const dt_drawlayer_paint_callbacks_t callbacks,
void user_data 
)
static

◆ _freeze_emitted_dab_raster_state()

static void _freeze_emitted_dab_raster_state ( dt_drawlayer_brush_dab_t dab,
const float  sample_spacing 
)
inlinestatic

◆ _lerpf()

static float _lerpf ( const float  a,
const float  b,
const float  t 
)
inlinestatic

◆ _paint_build_segment_window_sample()

◆ _paint_compact_raw_input_queue()

◆ _paint_cubic_hermitef()

static float _paint_cubic_hermitef ( const float  p0,
const float  p1,
const float  m0,
const float  m1,
const float  t 
)
inlinestatic

Cubic Hermite scalar interpolation helper.

References t.

Referenced by _paint_build_segment_window_sample().

◆ _paint_dab_sample_spacing()

static float _paint_dab_sample_spacing ( const dt_drawlayer_brush_dab_t dab,
const float  distance_percent 
)
inlinestatic

◆ _paint_input_starts_new_stroke()

◆ _paint_make_stroke_seed()

static uint64_t _paint_make_stroke_seed ( const dt_drawlayer_paint_raw_input_t input)
static

◆ _paint_process_one_raw_input()

static void _paint_process_one_raw_input ( dt_drawlayer_paint_stroke_t state,
const dt_drawlayer_paint_raw_input_t input,
const dt_drawlayer_paint_callbacks_t callbacks,
void user_data 
)
static

◆ _paint_reset_path_runtime_state()

◆ _paint_segment_sample_spacing()

static float _paint_segment_sample_spacing ( const dt_drawlayer_brush_dab_t dabs,
const int  count,
const float  distance_percent 
)
inlinestatic

Resolve one segment spacing target from edge dab radii.

References _paint_dab_sample_spacing(), and dt_drawlayer_brush_dab_t::radius.

Referenced by _paint_process_one_raw_input().

◆ _paint_stroke_sample_opacity_scale()

static float _paint_stroke_sample_opacity_scale ( const dt_drawlayer_brush_dab_t dab,
const float  sample_step 
)
inlinestatic

◆ _paint_union_damage_rect()

◆ _paint_voronoi_strip_angle_measure()

static float _paint_voronoi_strip_angle_measure ( const float  rho,
const float  strip_ratio 
)
inlinestatic

Compute angular measure used by strip-based profile integration.

References _clamp01().

Referenced by _paint_stroke_sample_opacity_scale().

◆ _sample_raw_segment_cubic_arclen()

static dt_drawlayer_brush_dab_t _sample_raw_segment_cubic_arclen ( const dt_drawlayer_paint_stroke_t state,
const dt_drawlayer_brush_dab_t segment_start,
const dt_drawlayer_brush_dab_t segment_end,
const float  target_norm,
const float *  cumulative,
const int  segments,
const float  total_len 
)
static

Sample a cubic segment at normalized arc length using LUT inversion.

References _clamp01(), _lerpf(), _sample_raw_segment_cubic_param(), l1, and MIN.

Referenced by _paint_process_one_raw_input().

◆ _sample_raw_segment_cubic_param()

static dt_drawlayer_brush_dab_t _sample_raw_segment_cubic_param ( const dt_drawlayer_paint_stroke_t state,
const dt_drawlayer_brush_dab_t segment_start,
const dt_drawlayer_brush_dab_t segment_end,
const float  t 
)
static

◆ dt_drawlayer_paint_finalize_path()

◆ dt_drawlayer_paint_interpolate_path()

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.

Note
No coalescing is performed here. FIFO order is preserved.

References _paint_compact_raw_input_queue(), _paint_process_one_raw_input(), dt_drawlayer_paint_stroke_t::raw_input_cursor, and dt_drawlayer_paint_stroke_t::raw_inputs.

Referenced by _process_backend_input(), and dt_drawlayer_worker_replay_finished_stroke_to_base_patch().

◆ dt_drawlayer_paint_merge_runtime_stroke_damage()

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.

Returns
TRUE when a valid rectangle was merged.

References _paint_union_damage_rect(), dt_drawlayer_paint_runtime_get_stroke_damage(), dt_drawlayer_paint_runtime_state_reset(), FALSE, and TRUE.

Referenced by dt_drawlayer_worker_publish_backend_stroke_damage().

◆ dt_drawlayer_paint_path_state_reset()

void dt_drawlayer_paint_path_state_reset ( dt_drawlayer_paint_stroke_t state)

Reset full stroke state including queued raw input events.

Reset stroke path state and pending raw queue for a new stroke.

References _paint_reset_path_runtime_state(), dt_drawlayer_paint_stroke_t::raw_input_cursor, and dt_drawlayer_paint_stroke_t::raw_inputs.

Referenced by _stroke_begin(), _stroke_clear(), and dt_drawlayer_worker_replay_finished_stroke_to_base_patch().

◆ dt_drawlayer_paint_queue_raw_input()

gboolean dt_drawlayer_paint_queue_raw_input ( dt_drawlayer_paint_stroke_t state,
const dt_drawlayer_paint_raw_input_t input 
)

◆ dt_drawlayer_paint_raster_path()

gboolean dt_drawlayer_paint_raster_path ( const GArray *  dabs,
const float  distance_percent,
dt_drawlayer_cache_patch_t patch,
const 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.

References dt_drawlayer_paint_rasterize_segment_to_buffer(), FALSE, and i.

Referenced by dt_drawlayer_worker_replay_finished_stroke_to_base_patch().

◆ dt_drawlayer_paint_rasterize_segment_to_buffer()

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.

Parameters
dabInput dab sample from path stream.
distance_percentSampling distance parameter in [0,1].
patchDestination float RGBA patch.
scaleLayer-to-buffer scale factor.
stroke_maskOptional stroke-local alpha mask patch.
runtime_stateAccumulated stroke damage output.
runtime_privateMutable stroke runtime payload.
Returns
TRUE when dab replay succeeded.

References _advance_smudge_pickup_state(), _clamp01(), _paint_dab_sample_spacing(), _paint_stroke_sample_opacity_scale(), dt_drawlayer_paint_stroke_t::bounds, dt_drawlayer_paint_stroke_t::dab_window, darktable, DT_DEBUG_PERF, DT_DEBUG_VERBOSE, DT_DRAWLAYER_BRUSH_MODE_SMUDGE, dt_drawlayer_brush_rasterize(), dt_drawlayer_paint_runtime_note_dab_damage(), dt_drawlayer_paint_runtime_set_smudge_pickup(), DT_DRAWLAYER_PAINT_STROKE_FIRST, dt_get_wtime(), dt_print(), FALSE, MIN, dt_drawlayer_brush_dab_t::mode, dt_drawlayer_damaged_rect_t::nw, dt_drawlayer_brush_dab_t::sample_opacity_scale, dt_drawlayer_brush_dab_t::sample_spacing, dt_drawlayer_damaged_rect_t::se, dt_drawlayer_brush_dab_t::stroke_pos, TRUE, darktable_t::unmuted, and dt_drawlayer_damaged_rect_t::valid.

Referenced by _process_backend_dab(), and dt_drawlayer_paint_raster_path().

◆ dt_drawlayer_paint_runtime_ensure_smudge_pixels()

gboolean dt_drawlayer_paint_runtime_ensure_smudge_pixels ( dt_drawlayer_paint_stroke_t state,
const int  width,
const int  height 
)

◆ dt_drawlayer_paint_runtime_get_smudge_pickup()

void dt_drawlayer_paint_runtime_get_smudge_pickup ( const dt_drawlayer_paint_stroke_t state,
float *  x,
float *  y 
)

◆ dt_drawlayer_paint_runtime_get_stroke_damage()

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.

References FALSE, TRUE, and dt_drawlayer_damaged_rect_t::valid.

Referenced by _process_backend_dab(), and dt_drawlayer_paint_merge_runtime_stroke_damage().

◆ dt_drawlayer_paint_runtime_get_stroke_seed()

uint64_t dt_drawlayer_paint_runtime_get_stroke_seed ( const dt_drawlayer_paint_stroke_t state)

Get current deterministic stroke seed.

References dt_drawlayer_paint_stroke_t::stroke_seed.

◆ dt_drawlayer_paint_runtime_have_smudge_pickup()

gboolean dt_drawlayer_paint_runtime_have_smudge_pickup ( const dt_drawlayer_paint_stroke_t state)

Query whether smudge pickup coordinates are initialized.

References dt_drawlayer_paint_stroke_t::have_smudge_pickup.

Referenced by _advance_smudge_pickup_state(), and _apply_smudge_stroke_mode().

◆ dt_drawlayer_paint_runtime_note_dab_damage()

◆ dt_drawlayer_paint_runtime_prepare_dab_context()

gboolean dt_drawlayer_paint_runtime_prepare_dab_context ( dt_drawlayer_paint_stroke_t state,
const dt_drawlayer_brush_dab_t dab,
const int  width,
const int  height,
const int  origin_x,
const int  origin_y,
const float  scale 
)

◆ dt_drawlayer_paint_runtime_private_create()

dt_drawlayer_paint_stroke_t * dt_drawlayer_paint_runtime_private_create ( void  )

Allocate stroke runtime payload object used by paint+brush internals.

References dt_drawlayer_paint_runtime_private_reset().

Referenced by _get_fullres_replay_scratch(), and _stroke_create().

◆ dt_drawlayer_paint_runtime_private_destroy()

void dt_drawlayer_paint_runtime_private_destroy ( dt_drawlayer_paint_stroke_t **  state)

Destroy stroke runtime payload and null pointer.

References dt_free, and TRUE.

Referenced by _destroy_fullres_replay_scratch(), _get_fullres_replay_scratch(), _stroke_create(), and _stroke_destroy().

◆ dt_drawlayer_paint_runtime_private_reset()

◆ dt_drawlayer_paint_runtime_set_smudge_pickup()

void dt_drawlayer_paint_runtime_set_smudge_pickup ( dt_drawlayer_paint_stroke_t state,
const float  x,
const float  y,
const gboolean  have_pickup 
)

◆ dt_drawlayer_paint_runtime_set_stroke_seed()

void dt_drawlayer_paint_runtime_set_stroke_seed ( dt_drawlayer_paint_stroke_t state,
const uint64_t  seed 
)

Set deterministic stroke seed for noise-derived effects.

References dt_drawlayer_paint_stroke_t::stroke_seed.

Referenced by _paint_stroke_seed_cb().

◆ dt_drawlayer_paint_runtime_smudge_height()

int dt_drawlayer_paint_runtime_smudge_height ( const dt_drawlayer_paint_stroke_t state)

Get smudge carry buffer height.

References dt_drawlayer_paint_stroke_t::smudge_height.

◆ dt_drawlayer_paint_runtime_smudge_pixels()

float * dt_drawlayer_paint_runtime_smudge_pixels ( dt_drawlayer_paint_stroke_t state)

Get smudge carry buffer pointer (RGBA float).

References dt_drawlayer_paint_stroke_t::smudge_pixels.

Referenced by _apply_smudge_stroke_mode().

◆ dt_drawlayer_paint_runtime_smudge_width()

int dt_drawlayer_paint_runtime_smudge_width ( const dt_drawlayer_paint_stroke_t state)

Get smudge carry buffer width.

References dt_drawlayer_paint_stroke_t::smudge_width.

Referenced by _apply_smudge_stroke_mode().

◆ dt_drawlayer_paint_runtime_state_create()

dt_drawlayer_damaged_rect_t * dt_drawlayer_paint_runtime_state_create ( void  )

Allocate zero-initialized stroke-damage accumulator state.

References dt_drawlayer_paint_runtime_state_reset().

Referenced by _rt_init_state().

◆ dt_drawlayer_paint_runtime_state_destroy()

void dt_drawlayer_paint_runtime_state_destroy ( dt_drawlayer_damaged_rect_t **  state)

Destroy stroke-damage accumulator state and null pointer.

References dt_free.

Referenced by _rt_destroy_state().

◆ dt_drawlayer_paint_runtime_state_reset()