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

Inline brush profile and mass primitives shared by paint/brush code. More...

#include "iop/drawlayer/brush.h"
#include <math.h>
+ Include dependency graph for brush_profile.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

static float dt_drawlayer_brush_profile_clamp01 (const float v)
 Clamp scalar value to [0, 1].
 
static float dt_drawlayer_brush_transition_profile_eval (const int shape, const float t, const float inv_t)
 Evaluate normalized edge-falloff transition profile by shape.
 
static float dt_drawlayer_brush_transition_mass_primitive_eval (const int shape, const float u, const float inner, const float w, const float base)
 Evaluate integrated mass primitive of transition zone by shape.
 
static float dt_drawlayer_brush_profile_eval (const dt_drawlayer_brush_dab_t *dab, const float norm2)
 Evaluate normalized brush profile at squared normalized radius.
 
static float dt_drawlayer_brush_mass_primitive_eval (const dt_drawlayer_brush_dab_t *dab, const float u_in)
 Evaluate radial mass primitive from center to normalized radius u_in.
 

Detailed Description

Inline brush profile and mass primitives shared by paint/brush code.

Function Documentation

◆ dt_drawlayer_brush_mass_primitive_eval()

static float dt_drawlayer_brush_mass_primitive_eval ( const dt_drawlayer_brush_dab_t dab,
const float  u_in 
)
inlinestatic

◆ dt_drawlayer_brush_profile_clamp01()

static float dt_drawlayer_brush_profile_clamp01 ( const float  v)
inlinestatic

◆ dt_drawlayer_brush_profile_eval()

static float dt_drawlayer_brush_profile_eval ( const dt_drawlayer_brush_dab_t dab,
const float  norm2 
)
inlinestatic

◆ dt_drawlayer_brush_transition_mass_primitive_eval()

static float dt_drawlayer_brush_transition_mass_primitive_eval ( const int  shape,
const float  u,
const float  inner,
const float  w,
const float  base 
)
inlinestatic

◆ dt_drawlayer_brush_transition_profile_eval()

static float dt_drawlayer_brush_transition_profile_eval ( const int  shape,
const float  t,
const float  inv_t 
)
inlinestatic

Evaluate normalized edge-falloff transition profile by shape.

References DT_DRAWLAYER_BRUSH_SHAPE_LINEAR, DT_DRAWLAYER_BRUSH_SHAPE_QUADRATIC, DT_DRAWLAYER_BRUSH_SHAPE_SIGMOIDAL, and t.

Referenced by dt_drawlayer_brush_profile_eval().