19#ifndef DT_IOP_DRAWLAYER_BRUSH_H
20#define DT_IOP_DRAWLAYER_BRUSH_H
109 float sample_opacity_scale,
166 float *transmittance,
167 float *noise_scratch,
188 float center_x,
float center_y,
189 float opacity_multiplier);
206 float center_x,
float center_y,
207 float opacity_multiplier,
208 const float background_rgb[3]);
gboolean dt_drawlayer_brush_rasterize_dab_rgbaf(const dt_drawlayer_brush_dab_t *dab, float *rgba, int width, int height, float center_x, float center_y, float opacity_multiplier, const float background_rgb[3])
Rasterize a single dab preview in linear float RGBA over an opaque background.
dt_drawlayer_brush_mode_t dt_iop_drawlayer_brush_mode_t
gboolean dt_drawlayer_brush_batch_is_uniform(const dt_drawlayer_brush_dab_t *dabs, guint count, dt_drawlayer_brush_batch_t *out)
Decide whether a run of dabs can take the batch path, and describe it if so.
dt_drawlayer_brush_mode_t
Pixel blending behavior used while stamping a dab.
@ DT_DRAWLAYER_BRUSH_MODE_ERASE
@ DT_DRAWLAYER_BRUSH_MODE_PAINT
@ DT_DRAWLAYER_BRUSH_MODE_BLUR
@ DT_DRAWLAYER_BRUSH_MODE_SMUDGE
gboolean dt_drawlayer_brush_rasterize_batch(const dt_drawlayer_brush_batch_t *batch, dt_drawlayer_cache_patch_t *patch, float scale, dt_drawlayer_cache_patch_t *stroke_mask, float *transmittance, float *noise_scratch, dt_drawlayer_damaged_rect_t *batch_damage)
Rasterize a whole batch in two passes: accumulate transmittance, then composite once.
dt_drawlayer_brush_shape_t dt_iop_drawlayer_brush_shape_t
dt_drawlayer_brush_shape_t
Supported analytic fall-off profiles for brush alpha.
@ DT_DRAWLAYER_BRUSH_SHAPE_SIGMOIDAL
@ DT_DRAWLAYER_BRUSH_SHAPE_GAUSSIAN
@ DT_DRAWLAYER_BRUSH_SHAPE_LINEAR
@ DT_DRAWLAYER_BRUSH_SHAPE_QUADRATIC
gboolean dt_drawlayer_brush_rasterize(const dt_drawlayer_cache_patch_t *sample_patch, dt_drawlayer_cache_patch_t *patch, float scale, const dt_drawlayer_brush_dab_t *dab, float sample_opacity_scale, dt_drawlayer_cache_patch_t *stroke_mask, struct dt_drawlayer_paint_stroke_t *stroke)
Rasterize one dab into a float RGBA buffer.
gboolean dt_drawlayer_brush_rasterize_dab_argb8(const dt_drawlayer_brush_dab_t *dab, uint8_t *argb, int width, int height, int stride, float center_x, float center_y, float opacity_multiplier)
Rasterize a single dab preview into ARGB8 for GUI overlays.
const dt_colormatrix_t dt_aligned_pixel_t out
A run of dabs that share everything the batch composite needs to be a single step.
const dt_drawlayer_brush_dab_t * dabs
Fully resolved input dab descriptor.
float sample_opacity_scale
float sprinkle_coarseness
Generic float RGBA patch stored either in malloc memory or pixel cache.
Integer axis-aligned rectangle in buffer coordinates.
Mutable stroke runtime state owned by worker/backend code.