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

The brush settings the drawlayer module keeps in the application configuration. More...

+ Include dependency graph for iop/drawlayer/conf.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define DRAWLAYER_CONF_BASE   "plugins/drawlayer/"
 
#define DRAWLAYER_CONF_BRUSH_SHAPE   DRAWLAYER_CONF_BASE "brush_shape"
 
#define DRAWLAYER_CONF_BRUSH_MODE   DRAWLAYER_CONF_BASE "brush_mode"
 
#define DRAWLAYER_CONF_COLOR_R   DRAWLAYER_CONF_BASE "color_r"
 
#define DRAWLAYER_CONF_COLOR_G   DRAWLAYER_CONF_BASE "color_g"
 
#define DRAWLAYER_CONF_COLOR_B   DRAWLAYER_CONF_BASE "color_b"
 
#define DRAWLAYER_CONF_SOFTNESS   DRAWLAYER_CONF_BASE "softness"
 
#define DRAWLAYER_CONF_OPACITY   DRAWLAYER_CONF_BASE "opacity"
 
#define DRAWLAYER_CONF_FLOW   DRAWLAYER_CONF_BASE "flow"
 
#define DRAWLAYER_CONF_SPRINKLES   DRAWLAYER_CONF_BASE "sprinkles"
 
#define DRAWLAYER_CONF_SPRINKLE_SIZE   DRAWLAYER_CONF_BASE "sprinkle_size"
 
#define DRAWLAYER_CONF_SPRINKLE_COARSENESS   DRAWLAYER_CONF_BASE "sprinkle_coarseness"
 
#define DRAWLAYER_CONF_DISTANCE   DRAWLAYER_CONF_BASE "distance"
 
#define DRAWLAYER_CONF_SMOOTHING   DRAWLAYER_CONF_BASE "smoothing"
 
#define DRAWLAYER_CONF_SIZE   DRAWLAYER_CONF_BASE "size"
 
#define DRAWLAYER_CONF_PICK_SOURCE   DRAWLAYER_CONF_BASE "pick_source"
 
#define DRAWLAYER_CONF_HDR_EV   DRAWLAYER_CONF_BASE "hdr_exposure"
 
#define DRAWLAYER_CONF_MAP_PRESSURE_SIZE   DRAWLAYER_CONF_BASE "map_pressure_size"
 
#define DRAWLAYER_CONF_MAP_PRESSURE_OPACITY   DRAWLAYER_CONF_BASE "map_pressure_opacity"
 
#define DRAWLAYER_CONF_MAP_PRESSURE_FLOW   DRAWLAYER_CONF_BASE "map_pressure_flow"
 
#define DRAWLAYER_CONF_MAP_PRESSURE_SOFTNESS   DRAWLAYER_CONF_BASE "map_pressure_softness"
 
#define DRAWLAYER_CONF_MAP_TILT_SIZE   DRAWLAYER_CONF_BASE "map_tilt_size"
 
#define DRAWLAYER_CONF_MAP_TILT_OPACITY   DRAWLAYER_CONF_BASE "map_tilt_opacity"
 
#define DRAWLAYER_CONF_MAP_TILT_FLOW   DRAWLAYER_CONF_BASE "map_tilt_flow"
 
#define DRAWLAYER_CONF_MAP_TILT_SOFTNESS   DRAWLAYER_CONF_BASE "map_tilt_softness"
 
#define DRAWLAYER_CONF_MAP_ACCEL_SIZE   DRAWLAYER_CONF_BASE "map_acceleration_size"
 
#define DRAWLAYER_CONF_MAP_ACCEL_OPACITY   DRAWLAYER_CONF_BASE "map_acceleration_opacity"
 
#define DRAWLAYER_CONF_MAP_ACCEL_FLOW   DRAWLAYER_CONF_BASE "map_acceleration_flow"
 
#define DRAWLAYER_CONF_MAP_ACCEL_SOFTNESS   DRAWLAYER_CONF_BASE "map_acceleration_hardness"
 
#define DRAWLAYER_CONF_PRESSURE_PROFILE   DRAWLAYER_CONF_BASE "pressure_profile"
 
#define DRAWLAYER_CONF_TILT_PROFILE   DRAWLAYER_CONF_BASE "tilt_profile"
 
#define DRAWLAYER_CONF_ACCEL_PROFILE   DRAWLAYER_CONF_BASE "acceleration_profile"
 

Functions

void dt_drawlayer_conf_ensure_defaults (void)
 Ensure all drawlayer GUI config keys exist with sane defaults.
 
dt_iop_drawlayer_brush_shape_t dt_drawlayer_conf_brush_shape (void)
 Read and clamp configured brush shape.
 
dt_iop_drawlayer_brush_mode_t dt_drawlayer_conf_brush_mode (void)
 Read and clamp configured brush blend mode.
 
float dt_drawlayer_conf_size (void)
 Read and clamp configured brush size (px).
 
float dt_drawlayer_conf_opacity (void)
 Read and clamp configured stroke opacity (%).
 
float dt_drawlayer_conf_flow (void)
 Read and clamp configured flow (%).
 
float dt_drawlayer_conf_sprinkles (void)
 Read and clamp configured sprinkles amount (%).
 
float dt_drawlayer_conf_sprinkle_size (void)
 Read and clamp configured sprinkle feature size (px).
 
float dt_drawlayer_conf_sprinkle_coarseness (void)
 Read and clamp configured sprinkle octave mix (%).
 
float dt_drawlayer_conf_distance (void)
 Read and clamp configured distance/sampling parameter (%).
 
float dt_drawlayer_conf_smoothing (void)
 Read and clamp configured smoothing parameter (%).
 
float dt_drawlayer_conf_hardness (void)
 Derive hardness as complementary value of softness.
 
float dt_drawlayer_conf_hdr_exposure (void)
 Read and clamp HDR picker exposure compensation (EV).
 
drawlayer_pick_source_t dt_drawlayer_conf_pick_source (void)
 Read and clamp color picker source selector.
 
drawlayer_mapping_profile_t dt_drawlayer_conf_mapping_profile (const char *key)
 Read and clamp one mapping-profile enum key.
 
void dt_drawlayer_conf_display_color (float rgb[3])
 Read configured display RGB brush color.
 
void dt_drawlayer_conf_load_color_history (dt_iop_drawlayer_gui_data_t *g)
 Load persisted color-history stack from config into widgets state.
 
void dt_drawlayer_conf_remember_display_color (dt_iop_module_t *self, const float display_rgb[3])
 Push current display color to history and trigger swatch redraw.
 
void dt_drawlayer_conf_apply_display_brush_color (dt_iop_module_t *self, const float display_rgb[3], const gboolean remember)
 Apply display-space brush color to conf, widgets and redraw.
 
void dt_drawlayer_conf_sync_color_picker (dt_iop_module_t *self)
 Refresh picker widgets from persisted config color.
 
void dt_drawlayer_conf_sync_params_from_gui (dt_iop_module_t *self, const gboolean record_history)
 Sync active GUI widget values back into persistent config keys.
 

Detailed Description

The brush settings the drawlayer module keeps in the application configuration.

Every read here parses a string – dt_conf_get_float() runs the expression calculator – and takes the application-wide conf mutex, so these are called when something CHANGES the brush, never per pointer motion. The GUI caches what it needs in its own brush_settings.

Definition in file iop/drawlayer/conf.h.

Macro Definition Documentation

◆ DRAWLAYER_CONF_ACCEL_PROFILE

#define DRAWLAYER_CONF_ACCEL_PROFILE   DRAWLAYER_CONF_BASE "acceleration_profile"

Definition at line 68 of file iop/drawlayer/conf.h.

◆ DRAWLAYER_CONF_BASE

#define DRAWLAYER_CONF_BASE   "plugins/drawlayer/"

Definition at line 37 of file iop/drawlayer/conf.h.

◆ DRAWLAYER_CONF_BRUSH_MODE

#define DRAWLAYER_CONF_BRUSH_MODE   DRAWLAYER_CONF_BASE "brush_mode"

Definition at line 39 of file iop/drawlayer/conf.h.

◆ DRAWLAYER_CONF_BRUSH_SHAPE

#define DRAWLAYER_CONF_BRUSH_SHAPE   DRAWLAYER_CONF_BASE "brush_shape"

Definition at line 38 of file iop/drawlayer/conf.h.

◆ DRAWLAYER_CONF_COLOR_B

#define DRAWLAYER_CONF_COLOR_B   DRAWLAYER_CONF_BASE "color_b"

Definition at line 42 of file iop/drawlayer/conf.h.

◆ DRAWLAYER_CONF_COLOR_G

#define DRAWLAYER_CONF_COLOR_G   DRAWLAYER_CONF_BASE "color_g"

Definition at line 41 of file iop/drawlayer/conf.h.

◆ DRAWLAYER_CONF_COLOR_R

#define DRAWLAYER_CONF_COLOR_R   DRAWLAYER_CONF_BASE "color_r"

Definition at line 40 of file iop/drawlayer/conf.h.

◆ DRAWLAYER_CONF_DISTANCE

#define DRAWLAYER_CONF_DISTANCE   DRAWLAYER_CONF_BASE "distance"

Definition at line 49 of file iop/drawlayer/conf.h.

◆ DRAWLAYER_CONF_FLOW

#define DRAWLAYER_CONF_FLOW   DRAWLAYER_CONF_BASE "flow"

Definition at line 45 of file iop/drawlayer/conf.h.

◆ DRAWLAYER_CONF_HDR_EV

#define DRAWLAYER_CONF_HDR_EV   DRAWLAYER_CONF_BASE "hdr_exposure"

Definition at line 53 of file iop/drawlayer/conf.h.

◆ DRAWLAYER_CONF_MAP_ACCEL_FLOW

#define DRAWLAYER_CONF_MAP_ACCEL_FLOW   DRAWLAYER_CONF_BASE "map_acceleration_flow"

Definition at line 64 of file iop/drawlayer/conf.h.

◆ DRAWLAYER_CONF_MAP_ACCEL_OPACITY

#define DRAWLAYER_CONF_MAP_ACCEL_OPACITY   DRAWLAYER_CONF_BASE "map_acceleration_opacity"

Definition at line 63 of file iop/drawlayer/conf.h.

◆ DRAWLAYER_CONF_MAP_ACCEL_SIZE

#define DRAWLAYER_CONF_MAP_ACCEL_SIZE   DRAWLAYER_CONF_BASE "map_acceleration_size"

Definition at line 62 of file iop/drawlayer/conf.h.

◆ DRAWLAYER_CONF_MAP_ACCEL_SOFTNESS

#define DRAWLAYER_CONF_MAP_ACCEL_SOFTNESS   DRAWLAYER_CONF_BASE "map_acceleration_hardness"

Definition at line 65 of file iop/drawlayer/conf.h.

◆ DRAWLAYER_CONF_MAP_PRESSURE_FLOW

#define DRAWLAYER_CONF_MAP_PRESSURE_FLOW   DRAWLAYER_CONF_BASE "map_pressure_flow"

Definition at line 56 of file iop/drawlayer/conf.h.

◆ DRAWLAYER_CONF_MAP_PRESSURE_OPACITY

#define DRAWLAYER_CONF_MAP_PRESSURE_OPACITY   DRAWLAYER_CONF_BASE "map_pressure_opacity"

Definition at line 55 of file iop/drawlayer/conf.h.

◆ DRAWLAYER_CONF_MAP_PRESSURE_SIZE

#define DRAWLAYER_CONF_MAP_PRESSURE_SIZE   DRAWLAYER_CONF_BASE "map_pressure_size"

Definition at line 54 of file iop/drawlayer/conf.h.

◆ DRAWLAYER_CONF_MAP_PRESSURE_SOFTNESS

#define DRAWLAYER_CONF_MAP_PRESSURE_SOFTNESS   DRAWLAYER_CONF_BASE "map_pressure_softness"

Definition at line 57 of file iop/drawlayer/conf.h.

◆ DRAWLAYER_CONF_MAP_TILT_FLOW

#define DRAWLAYER_CONF_MAP_TILT_FLOW   DRAWLAYER_CONF_BASE "map_tilt_flow"

Definition at line 60 of file iop/drawlayer/conf.h.

◆ DRAWLAYER_CONF_MAP_TILT_OPACITY

#define DRAWLAYER_CONF_MAP_TILT_OPACITY   DRAWLAYER_CONF_BASE "map_tilt_opacity"

Definition at line 59 of file iop/drawlayer/conf.h.

◆ DRAWLAYER_CONF_MAP_TILT_SIZE

#define DRAWLAYER_CONF_MAP_TILT_SIZE   DRAWLAYER_CONF_BASE "map_tilt_size"

Definition at line 58 of file iop/drawlayer/conf.h.

◆ DRAWLAYER_CONF_MAP_TILT_SOFTNESS

#define DRAWLAYER_CONF_MAP_TILT_SOFTNESS   DRAWLAYER_CONF_BASE "map_tilt_softness"

Definition at line 61 of file iop/drawlayer/conf.h.

◆ DRAWLAYER_CONF_OPACITY

#define DRAWLAYER_CONF_OPACITY   DRAWLAYER_CONF_BASE "opacity"

Definition at line 44 of file iop/drawlayer/conf.h.

◆ DRAWLAYER_CONF_PICK_SOURCE

#define DRAWLAYER_CONF_PICK_SOURCE   DRAWLAYER_CONF_BASE "pick_source"

Definition at line 52 of file iop/drawlayer/conf.h.

◆ DRAWLAYER_CONF_PRESSURE_PROFILE

#define DRAWLAYER_CONF_PRESSURE_PROFILE   DRAWLAYER_CONF_BASE "pressure_profile"

Definition at line 66 of file iop/drawlayer/conf.h.

◆ DRAWLAYER_CONF_SIZE

#define DRAWLAYER_CONF_SIZE   DRAWLAYER_CONF_BASE "size"

Definition at line 51 of file iop/drawlayer/conf.h.

◆ DRAWLAYER_CONF_SMOOTHING

#define DRAWLAYER_CONF_SMOOTHING   DRAWLAYER_CONF_BASE "smoothing"

Definition at line 50 of file iop/drawlayer/conf.h.

◆ DRAWLAYER_CONF_SOFTNESS

#define DRAWLAYER_CONF_SOFTNESS   DRAWLAYER_CONF_BASE "softness"

Definition at line 43 of file iop/drawlayer/conf.h.

◆ DRAWLAYER_CONF_SPRINKLE_COARSENESS

#define DRAWLAYER_CONF_SPRINKLE_COARSENESS   DRAWLAYER_CONF_BASE "sprinkle_coarseness"

Definition at line 48 of file iop/drawlayer/conf.h.

◆ DRAWLAYER_CONF_SPRINKLE_SIZE

#define DRAWLAYER_CONF_SPRINKLE_SIZE   DRAWLAYER_CONF_BASE "sprinkle_size"

Definition at line 47 of file iop/drawlayer/conf.h.

◆ DRAWLAYER_CONF_SPRINKLES

#define DRAWLAYER_CONF_SPRINKLES   DRAWLAYER_CONF_BASE "sprinkles"

Definition at line 46 of file iop/drawlayer/conf.h.

◆ DRAWLAYER_CONF_TILT_PROFILE

#define DRAWLAYER_CONF_TILT_PROFILE   DRAWLAYER_CONF_BASE "tilt_profile"

Definition at line 67 of file iop/drawlayer/conf.h.

Function Documentation

◆ dt_drawlayer_conf_apply_display_brush_color()

◆ dt_drawlayer_conf_brush_mode()

◆ dt_drawlayer_conf_brush_shape()

◆ dt_drawlayer_conf_display_color()

void dt_drawlayer_conf_display_color ( float  rgb[3])

◆ dt_drawlayer_conf_distance()

float dt_drawlayer_conf_distance ( void  )

Read and clamp configured distance/sampling parameter (%).

Definition at line 152 of file iop/drawlayer/conf.c.

References DRAWLAYER_CONF_DISTANCE, and dt_conf_get_float().

Referenced by _fill_input_brush_settings(), _refresh_brush_settings_cache(), and gui_update().

◆ dt_drawlayer_conf_ensure_defaults()

◆ dt_drawlayer_conf_flow()

float dt_drawlayer_conf_flow ( void  )

Read and clamp configured flow (%).

Definition at line 128 of file iop/drawlayer/conf.c.

References DRAWLAYER_CONF_FLOW, and dt_conf_get_float().

Referenced by _compute_hud_brush_state(), _fill_input_brush_settings(), _refresh_brush_settings_cache(), and gui_update().

◆ dt_drawlayer_conf_hardness()

float dt_drawlayer_conf_hardness ( void  )

Derive hardness as complementary value of softness.

Definition at line 170 of file iop/drawlayer/conf.c.

References _conf_softness().

Referenced by _compute_hud_brush_state(), _fill_input_brush_settings(), _refresh_brush_settings_cache(), _sync_brush_profile_preview_widget(), and gui_update().

◆ dt_drawlayer_conf_hdr_exposure()

float dt_drawlayer_conf_hdr_exposure ( void  )

Read and clamp HDR picker exposure compensation (EV).

Definition at line 176 of file iop/drawlayer/conf.c.

References DRAWLAYER_CONF_HDR_EV, and dt_conf_get_float().

Referenced by _brush_pipeline_color_from_display(), _working_rgb_to_display_rgb(), and gui_update().

◆ dt_drawlayer_conf_load_color_history()

void dt_drawlayer_conf_load_color_history ( dt_iop_drawlayer_gui_data_t *  g)

◆ dt_drawlayer_conf_mapping_profile()

drawlayer_mapping_profile_t dt_drawlayer_conf_mapping_profile ( const char *  key)

◆ dt_drawlayer_conf_opacity()

float dt_drawlayer_conf_opacity ( void  )

◆ dt_drawlayer_conf_pick_source()

drawlayer_pick_source_t dt_drawlayer_conf_pick_source ( void  )

Read and clamp color picker source selector.

Definition at line 182 of file iop/drawlayer/conf.c.

References DRAWLAYER_CONF_PICK_SOURCE, DRAWLAYER_PICK_SOURCE_INPUT, DRAWLAYER_PICK_SOURCE_OUTPUT, and dt_conf_get_int().

Referenced by color_picker_apply(), and gui_update().

◆ dt_drawlayer_conf_remember_display_color()

void dt_drawlayer_conf_remember_display_color ( dt_iop_module_t *  self,
const float  display_rgb[3] 
)

Push current display color to history and trigger swatch redraw.

Definition at line 264 of file iop/drawlayer/conf.c.

References _store_color_history(), dt_drawlayer_widgets_push_color_history(), dt_iop_gui_data(), g, and IS_NULL_PTR.

Referenced by _color_picker_button_release(), and dt_drawlayer_conf_apply_display_brush_color().

◆ dt_drawlayer_conf_size()

float dt_drawlayer_conf_size ( void  )

◆ dt_drawlayer_conf_smoothing()

float dt_drawlayer_conf_smoothing ( void  )

Read and clamp configured smoothing parameter (%).

Definition at line 158 of file iop/drawlayer/conf.c.

References DRAWLAYER_CONF_SMOOTHING, and dt_conf_get_float().

Referenced by _fill_input_brush_settings(), _refresh_brush_settings_cache(), and gui_update().

◆ dt_drawlayer_conf_sprinkle_coarseness()

float dt_drawlayer_conf_sprinkle_coarseness ( void  )

Read and clamp configured sprinkle octave mix (%).

Definition at line 146 of file iop/drawlayer/conf.c.

References DRAWLAYER_CONF_SPRINKLE_COARSENESS, and dt_conf_get_float().

Referenced by _fill_input_brush_settings(), _refresh_brush_settings_cache(), _sync_brush_profile_preview_widget(), and gui_update().

◆ dt_drawlayer_conf_sprinkle_size()

float dt_drawlayer_conf_sprinkle_size ( void  )

Read and clamp configured sprinkle feature size (px).

Definition at line 140 of file iop/drawlayer/conf.c.

References DRAWLAYER_CONF_SPRINKLE_SIZE, and dt_conf_get_float().

Referenced by _fill_input_brush_settings(), _refresh_brush_settings_cache(), _sync_brush_profile_preview_widget(), and gui_update().

◆ dt_drawlayer_conf_sprinkles()

float dt_drawlayer_conf_sprinkles ( void  )

Read and clamp configured sprinkles amount (%).

Definition at line 134 of file iop/drawlayer/conf.c.

References DRAWLAYER_CONF_SPRINKLES, and dt_conf_get_float().

Referenced by _fill_input_brush_settings(), _refresh_brush_settings_cache(), _sync_brush_profile_preview_widget(), and gui_update().

◆ dt_drawlayer_conf_sync_color_picker()

void dt_drawlayer_conf_sync_color_picker ( dt_iop_module_t *  self)

Refresh picker widgets from persisted config color.

Definition at line 297 of file iop/drawlayer/conf.c.

References dt_drawlayer_conf_display_color(), dt_drawlayer_sync_cached_brush_colors(), dt_drawlayer_widgets_set_display_color(), dt_iop_gui_data(), g, and IS_NULL_PTR.

Referenced by gui_update().

◆ dt_drawlayer_conf_sync_params_from_gui()