![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
Drawlayer widget helpers (picker, swatch, color history). More...
#include "iop/drawlayer/widgets.h"#include "iop/drawlayer/paint.h"#include "gui/gtk.h"#include <float.h>#include <math.h>#include <string.h>
Include dependency graph for widgets.c:Data Structures | |
| struct | dt_drawlayer_widgets_t |
| Runtime state for drawlayer custom color widgets. More... | |
Macros | |
| #define | DT_DRAWLAYER_PICKER_U_MAX 0.70710678f |
| #define | DT_DRAWLAYER_PICKER_V_MAX 0.81649658f |
| #define | DT_DRAWLAYER_PICKER_C_MAX 0.81649658f |
Typedefs | |
| typedef enum dt_drawlayer_color_drag_mode_t | dt_drawlayer_color_drag_mode_t |
| Active drag target in picker UI. | |
Enumerations | |
| enum | dt_drawlayer_color_drag_mode_t { DT_DRAWLAYER_COLOR_DRAG_NONE = 0 , DT_DRAWLAYER_COLOR_DRAG_DISC = 1 , DT_DRAWLAYER_COLOR_DRAG_PLANE = 2 } |
| Active drag target in picker UI. More... | |
Functions | |
| static float | _clamp01 (const float value) |
| Clamp scalar to [0,1]. | |
| static gboolean | _display_rgb_equal (const float a[3], const float b[3]) |
| Compare display-RGB triplets with tiny epsilon tolerance. | |
| static void | _picker_update_polar_from_uv (dt_drawlayer_widgets_t *widgets) |
| Update hue/chroma from current U/V components. | |
| static void | _picker_update_uv_from_polar (dt_drawlayer_widgets_t *widgets) |
| Update U/V from current hue/chroma components. | |
| static int | _picker_project_opponent_to_display_rgb (const float m, const float u, const float v, float display_rgb[3]) |
| Project opponent-space color to display RGB; fail when out of gamut. | |
| static float | _picker_max_chroma_for_m_hue (const float m, const float hue) |
| Compute max reachable chroma at given lightness/hue within display gamut. | |
| static void | _picker_clamp_state_to_gamut (dt_drawlayer_widgets_t *widgets) |
| Clamp picker state so projected display RGB always remains valid. | |
| static void | _sync_picker_from_display_rgb (dt_drawlayer_widgets_t *widgets, const float display_rgb[3]) |
| Initialize picker opponent coordinates from display RGB color. | |
| static void | _clear_color_picker_surface (dt_drawlayer_widgets_t *widgets) |
| Destroy cached picker surface and reset cache metadata. | |
| static void | _clear_profile_surface (dt_drawlayer_widgets_t *widgets) |
| Destroy cached brush-profile preview surface and reset cache metadata. | |
| static void | _brush_profile_geometry (const GtkWidget *widget, float *x, float *y, float *width, float *height, float *gap, int *cell_count) |
| Compute profile-row geometry inside widget. | |
| static gboolean | _brush_profile_cell_rect (const GtkWidget *widget, const int index, float *x, float *y, float *width, float *height) |
| Compute one profile-cell rectangle. | |
| static uint8_t | _linear_channel_to_u8 (const float x) |
| Convert linear float channel to display-encoded 8-bit channel. | |
| static void | _render_brush_profile_cell (unsigned char *dst, const int stride, const int width, const int height, float *rgba_scratch, const dt_drawlayer_widgets_t *widgets, const int shape) |
| Render one brush preview cell into ARGB8 memory. | |
| static void | _color_picker_geometry (const GtkWidget *widget, float *uv_x, float *uv_y, float *uv_size, float *plane_x, float *plane_y, float *plane_w, float *plane_h) |
| Compute picker-disc and value/chroma-plane geometry inside widget. | |
| static float | _color_picker_hit_margin (void) |
| Hit-margin in device-independent pixels for drag continuity. | |
| static gboolean | _rect_contains_with_margin (const float x, const float y, const float rx, const float ry, const float rw, const float rh, const float margin) |
| Rectangle hit-test with configurable margin expansion. | |
| dt_drawlayer_widgets_t * | dt_drawlayer_widgets_init (void) |
| Allocate and initialize widget runtime state. | |
| void | dt_drawlayer_widgets_cleanup (dt_drawlayer_widgets_t **widgets) |
| Free widget runtime state and owned cairo resources. | |
| void | dt_drawlayer_widgets_set_display_color (dt_drawlayer_widgets_t *widgets, const float display_rgb[3]) |
| Set current color and synchronize picker internals. | |
| gboolean | dt_drawlayer_widgets_get_display_color (const dt_drawlayer_widgets_t *widgets, float display_rgb[3]) |
| Get current color projected to display RGB. | |
| void | dt_drawlayer_widgets_mark_picker_dirty (dt_drawlayer_widgets_t *widgets) |
| Mark picker surface dirty for regeneration on next draw. | |
| void | dt_drawlayer_widgets_set_color_history (dt_drawlayer_widgets_t *widgets, const float history[DT_DRAWLAYER_COLOR_HISTORY_COUNT][3], const gboolean valid[DT_DRAWLAYER_COLOR_HISTORY_COUNT]) |
| Replace full color-history content and validity flags. | |
| void | dt_drawlayer_widgets_get_color_history (const dt_drawlayer_widgets_t *widgets, float history[DT_DRAWLAYER_COLOR_HISTORY_COUNT][3], gboolean valid[DT_DRAWLAYER_COLOR_HISTORY_COUNT]) |
| Copy full color-history content and validity flags out. | |
| gboolean | dt_drawlayer_widgets_push_color_history (dt_drawlayer_widgets_t *widgets, const float display_rgb[3]) |
| Push one color to history head if different from current head. | |
| gboolean | dt_drawlayer_widgets_update_from_picker_position (dt_drawlayer_widgets_t *widgets, GtkWidget *widget, float x, float y, float display_rgb[3]) |
| Update picker state from mouse position and return selected color. | |
| gboolean | dt_drawlayer_widgets_finish_picker_drag (dt_drawlayer_widgets_t *widgets, float display_rgb[3]) |
| End picker drag mode and optionally output current color. | |
| gboolean | dt_drawlayer_widgets_is_picker_dragging (const dt_drawlayer_widgets_t *widgets) |
| Tell whether picker drag interaction is currently active. | |
| gboolean | dt_drawlayer_widgets_pick_history_color (const dt_drawlayer_widgets_t *widgets, GtkWidget *widget, float x, float y, float display_rgb[3]) |
| Pick one history swatch color from widget coordinates. | |
| gboolean | dt_drawlayer_widgets_draw_picker (dt_drawlayer_widgets_t *widgets, GtkWidget *widget, cairo_t *cr, double pixels_per_dip) |
| Draw color picker map, controls and selection markers. | |
| gboolean | dt_drawlayer_widgets_draw_swatch (const dt_drawlayer_widgets_t *widgets, GtkWidget *widget, cairo_t *cr) |
| Draw compact color-history swatch grid. | |
| void | dt_drawlayer_widgets_set_brush_profile_preview (dt_drawlayer_widgets_t *widgets, const float opacity, const float hardness, const float sprinkles, const float sprinkle_size, const float sprinkle_coarseness, const int selected_shape) |
| Update cached brush-profile preview parameters and selected profile. | |
| int | dt_drawlayer_widgets_get_brush_profile_selection (const dt_drawlayer_widgets_t *widgets) |
| Read currently selected brush profile. | |
| gboolean | dt_drawlayer_widgets_draw_brush_profiles (dt_drawlayer_widgets_t *widgets, GtkWidget *widget, cairo_t *cr, const double pixels_per_dip) |
| Draw selectable row of brush-profile previews. | |
| gboolean | dt_drawlayer_widgets_pick_brush_profile (dt_drawlayer_widgets_t *widgets, GtkWidget *widget, const float x, const float y, int *shape) |
| Hit-test and select one brush profile from the preview row. | |
Drawlayer widget helpers (picker, swatch, color history).
| #define DT_DRAWLAYER_PICKER_C_MAX 0.81649658f |
| #define DT_DRAWLAYER_PICKER_U_MAX 0.70710678f |
| #define DT_DRAWLAYER_PICKER_V_MAX 0.81649658f |
Active drag target in picker UI.
|
static |
Compute one profile-cell rectangle.
References _brush_profile_geometry(), FALSE, height, TRUE, width, and x.
Referenced by dt_drawlayer_widgets_draw_brush_profiles(), and dt_drawlayer_widgets_pick_brush_profile().
|
static |
Compute profile-row geometry inside widget.
References DT_PIXEL_APPLY_DPI, height, width, and x.
Referenced by _brush_profile_cell_rect(), and dt_drawlayer_widgets_draw_brush_profiles().
|
inlinestatic |
Clamp scalar to [0,1].
References value.
Referenced by _linear_channel_to_u8(), _render_brush_profile_cell(), dt_drawlayer_widgets_draw_picker(), dt_drawlayer_widgets_push_color_history(), dt_drawlayer_widgets_set_brush_profile_preview(), dt_drawlayer_widgets_set_color_history(), and dt_drawlayer_widgets_update_from_picker_position().
|
static |
Destroy cached picker surface and reset cache metadata.
References dt_drawlayer_widgets_t::color_surface, dt_drawlayer_widgets_t::color_surface_dirty, dt_drawlayer_widgets_t::color_surface_height, dt_drawlayer_widgets_t::color_surface_ppd, dt_drawlayer_widgets_t::color_surface_width, and TRUE.
Referenced by dt_drawlayer_widgets_cleanup(), and dt_drawlayer_widgets_draw_picker().
|
static |
Destroy cached brush-profile preview surface and reset cache metadata.
References dt_drawlayer_widgets_t::profile_surface, dt_drawlayer_widgets_t::profile_surface_dirty, dt_drawlayer_widgets_t::profile_surface_height, dt_drawlayer_widgets_t::profile_surface_ppd, dt_drawlayer_widgets_t::profile_surface_width, and TRUE.
Referenced by dt_drawlayer_widgets_cleanup(), and dt_drawlayer_widgets_draw_brush_profiles().
|
static |
Compute picker-disc and value/chroma-plane geometry inside widget.
References DT_PIXEL_APPLY_DPI, height, size, and width.
Referenced by dt_drawlayer_widgets_draw_picker(), and dt_drawlayer_widgets_update_from_picker_position().
|
static |
Hit-margin in device-independent pixels for drag continuity.
References darktable, DT_PIXEL_APPLY_DPI, darktable_t::gui, and dt_gui_gtk_t::ppd.
Referenced by dt_drawlayer_widgets_update_from_picker_position().
|
static |
Compare display-RGB triplets with tiny epsilon tolerance.
Referenced by dt_drawlayer_widgets_push_color_history().
|
inlinestatic |
Convert linear float channel to display-encoded 8-bit channel.
References _clamp01(), v, and x.
Referenced by _render_brush_profile_cell().
|
static |
Clamp picker state so projected display RGB always remains valid.
References _picker_max_chroma_for_m_hue(), _picker_update_polar_from_uv(), _picker_update_uv_from_polar(), dt_drawlayer_widgets_t::picker_chroma, dt_drawlayer_widgets_t::picker_hue, and dt_drawlayer_widgets_t::picker_m.
Referenced by _sync_picker_from_display_rgb(), and dt_drawlayer_widgets_update_from_picker_position().
|
static |
Compute max reachable chroma at given lightness/hue within display gamut.
Referenced by _picker_clamp_state_to_gamut().
|
static |
Project opponent-space color to display RGB; fail when out of gamut.
Referenced by dt_drawlayer_widgets_draw_picker(), dt_drawlayer_widgets_finish_picker_drag(), dt_drawlayer_widgets_get_display_color(), and dt_drawlayer_widgets_update_from_picker_position().
|
static |
Update hue/chroma from current U/V components.
References dt_drawlayer_widgets_t::picker_chroma, dt_drawlayer_widgets_t::picker_hue, dt_drawlayer_widgets_t::picker_u, and dt_drawlayer_widgets_t::picker_v.
Referenced by _picker_clamp_state_to_gamut().
|
static |
Update U/V from current hue/chroma components.
References dt_drawlayer_widgets_t::picker_chroma, dt_drawlayer_widgets_t::picker_hue, dt_drawlayer_widgets_t::picker_u, and dt_drawlayer_widgets_t::picker_v.
Referenced by _picker_clamp_state_to_gamut().
|
static |
Rectangle hit-test with configurable margin expansion.
References x.
Referenced by dt_drawlayer_widgets_update_from_picker_position().
|
static |
Render one brush preview cell into ARGB8 memory.
References _clamp01(), _linear_channel_to_u8(), DT_DRAWLAYER_BRUSH_MODE_PAINT, dt_drawlayer_brush_rasterize_dab_rgbaf(), height, dt_drawlayer_widgets_t::profile_hardness, dt_drawlayer_widgets_t::profile_opacity, dt_drawlayer_widgets_t::profile_sprinkle_coarseness, dt_drawlayer_widgets_t::profile_sprinkle_size, dt_drawlayer_widgets_t::profile_sprinkles, row, width, x, and dt_drawlayer_brush_dab_t::x.
Referenced by dt_drawlayer_widgets_draw_brush_profiles().
|
static |
Initialize picker opponent coordinates from display RGB color.
References _picker_clamp_state_to_gamut(), dt_drawlayer_widgets_t::picker_m, dt_drawlayer_widgets_t::picker_u, and dt_drawlayer_widgets_t::picker_v.
Referenced by dt_drawlayer_widgets_set_display_color().
| void dt_drawlayer_widgets_cleanup | ( | dt_drawlayer_widgets_t ** | widgets | ) |
Free widget runtime state and owned cairo resources.
Destroy widget runtime state and owned surfaces.
References _clear_color_picker_surface(), _clear_profile_surface(), and dt_free.
Referenced by gui_cleanup().
| gboolean dt_drawlayer_widgets_draw_brush_profiles | ( | dt_drawlayer_widgets_t * | widgets, |
| GtkWidget * | widget, | ||
| cairo_t * | cr, | ||
| const double | pixels_per_dip | ||
| ) |
Draw selectable row of brush-profile previews.
References _brush_profile_cell_rect(), _brush_profile_geometry(), _clear_profile_surface(), _render_brush_profile_cell(), dt_free, FALSE, height, i, MAX, MIN, dt_drawlayer_widgets_t::profile_selected_shape, dt_drawlayer_widgets_t::profile_surface, dt_drawlayer_widgets_t::profile_surface_dirty, dt_drawlayer_widgets_t::profile_surface_height, dt_drawlayer_widgets_t::profile_surface_ppd, dt_drawlayer_widgets_t::profile_surface_width, TRUE, and width.
Referenced by _brush_profile_draw().
| gboolean dt_drawlayer_widgets_draw_picker | ( | dt_drawlayer_widgets_t * | widgets, |
| GtkWidget * | widget, | ||
| cairo_t * | cr, | ||
| double | pixels_per_dip | ||
| ) |
Draw color picker map, controls and selection markers.
Draw full picker UI (map, marker, history swatches).
References _clamp01(), _clear_color_picker_surface(), _color_picker_geometry(), _picker_project_opponent_to_display_rgb(), dt_drawlayer_widgets_t::color_surface, dt_drawlayer_widgets_t::color_surface_dirty, dt_drawlayer_widgets_t::color_surface_height, dt_drawlayer_widgets_t::color_surface_ppd, dt_drawlayer_widgets_t::color_surface_width, DT_DRAWLAYER_PICKER_C_MAX, DT_DRAWLAYER_PICKER_U_MAX, DT_DRAWLAYER_PICKER_V_MAX, FALSE, fx, height, m, MAX, dt_drawlayer_widgets_t::picker_chroma, dt_drawlayer_widgets_t::picker_hue, dt_drawlayer_widgets_t::picker_m, dt_drawlayer_widgets_t::picker_u, dt_drawlayer_widgets_t::picker_v, rgb, TRUE, v, and width.
Referenced by _color_picker_draw().
| gboolean dt_drawlayer_widgets_draw_swatch | ( | const dt_drawlayer_widgets_t * | widgets, |
| GtkWidget * | widget, | ||
| cairo_t * | cr | ||
| ) |
Draw compact color-history swatch grid.
Draw compact current-color swatch widget.
References dt_drawlayer_widgets_t::color_history, dt_drawlayer_widgets_t::color_history_valid, DT_DRAWLAYER_COLOR_HISTORY_COLS, DT_DRAWLAYER_COLOR_HISTORY_COUNT, DT_DRAWLAYER_COLOR_HISTORY_ROWS, DT_PIXEL_APPLY_DPI, FALSE, height, i, MAX, row, width, and x.
Referenced by _color_swatch_draw().
| gboolean dt_drawlayer_widgets_finish_picker_drag | ( | dt_drawlayer_widgets_t * | widgets, |
| float | display_rgb[3] | ||
| ) |
End picker drag mode and optionally output current color.
End picker drag and return final selected color.
References _picker_project_opponent_to_display_rgb(), DT_DRAWLAYER_COLOR_DRAG_NONE, FALSE, dt_drawlayer_widgets_t::picker_drag_mode, dt_drawlayer_widgets_t::picker_m, dt_drawlayer_widgets_t::picker_u, and dt_drawlayer_widgets_t::picker_v.
Referenced by _color_picker_button_release().
| int dt_drawlayer_widgets_get_brush_profile_selection | ( | const dt_drawlayer_widgets_t * | widgets | ) |
Read currently selected brush profile.
References DT_DRAWLAYER_BRUSH_SHAPE_LINEAR, and dt_drawlayer_widgets_t::profile_selected_shape.
Referenced by _sync_params_from_gui().
| void dt_drawlayer_widgets_get_color_history | ( | const dt_drawlayer_widgets_t * | widgets, |
| float | history[DT_DRAWLAYER_COLOR_HISTORY_COUNT][3], | ||
| gboolean | valid[DT_DRAWLAYER_COLOR_HISTORY_COUNT] | ||
| ) |
Copy full color-history content and validity flags out.
References dt_drawlayer_widgets_t::color_history, dt_drawlayer_widgets_t::color_history_valid, DT_DRAWLAYER_COLOR_HISTORY_COUNT, and i.
Referenced by _store_color_history().
| gboolean dt_drawlayer_widgets_get_display_color | ( | const dt_drawlayer_widgets_t * | widgets, |
| float | display_rgb[3] | ||
| ) |
Get current color projected to display RGB.
Get current display RGB color.
References _picker_project_opponent_to_display_rgb(), FALSE, dt_drawlayer_widgets_t::picker_m, dt_drawlayer_widgets_t::picker_u, and dt_drawlayer_widgets_t::picker_v.
| dt_drawlayer_widgets_t * dt_drawlayer_widgets_init | ( | void | ) |
Allocate and initialize widget runtime state.
References dt_drawlayer_widgets_t::color_surface_dirty, DT_DRAWLAYER_BRUSH_SHAPE_LINEAR, DT_DRAWLAYER_COLOR_DRAG_NONE, dt_drawlayer_widgets_t::picker_drag_mode, dt_drawlayer_widgets_t::profile_hardness, dt_drawlayer_widgets_t::profile_opacity, dt_drawlayer_widgets_t::profile_selected_shape, dt_drawlayer_widgets_t::profile_sprinkle_coarseness, dt_drawlayer_widgets_t::profile_sprinkle_size, dt_drawlayer_widgets_t::profile_surface_dirty, and TRUE.
Referenced by gui_init().
| gboolean dt_drawlayer_widgets_is_picker_dragging | ( | const dt_drawlayer_widgets_t * | widgets | ) |
Tell whether picker drag interaction is currently active.
Query whether picker drag is currently active.
References DT_DRAWLAYER_COLOR_DRAG_NONE, and dt_drawlayer_widgets_t::picker_drag_mode.
Referenced by _color_picker_motion().
| void dt_drawlayer_widgets_mark_picker_dirty | ( | dt_drawlayer_widgets_t * | widgets | ) |
Mark picker surface dirty for regeneration on next draw.
Mark picker backing surface dirty for redraw/rebuild.
References dt_drawlayer_widgets_t::color_surface_dirty, and TRUE.
| gboolean dt_drawlayer_widgets_pick_brush_profile | ( | dt_drawlayer_widgets_t * | widgets, |
| GtkWidget * | widget, | ||
| const float | x, | ||
| const float | y, | ||
| int * | shape | ||
| ) |
Hit-test and select one brush profile from the preview row.
References _brush_profile_cell_rect(), DT_DRAWLAYER_BRUSH_SHAPE_LINEAR, DT_DRAWLAYER_BRUSH_SHAPE_SIGMOIDAL, FALSE, i, dt_drawlayer_widgets_t::profile_selected_shape, dt_drawlayer_widgets_t::profile_surface_dirty, TRUE, and x.
Referenced by _brush_profile_button_press().
| gboolean dt_drawlayer_widgets_pick_history_color | ( | const dt_drawlayer_widgets_t * | widgets, |
| GtkWidget * | widget, | ||
| float | x, | ||
| float | y, | ||
| float | display_rgb[3] | ||
| ) |
Pick one history swatch color from widget coordinates.
Hit-test and pick color from history swatches.
References dt_drawlayer_widgets_t::color_history, dt_drawlayer_widgets_t::color_history_valid, DT_DRAWLAYER_COLOR_HISTORY_COLS, DT_DRAWLAYER_COLOR_HISTORY_COUNT, DT_DRAWLAYER_COLOR_HISTORY_ROWS, FALSE, height, row, TRUE, width, and x.
Referenced by _color_swatch_button_press().
| gboolean dt_drawlayer_widgets_push_color_history | ( | dt_drawlayer_widgets_t * | widgets, |
| const float | display_rgb[3] | ||
| ) |
Push one color to history head if different from current head.
Push one color in history if it differs from current head.
References _clamp01(), _display_rgb_equal(), dt_drawlayer_widgets_t::color_history, dt_drawlayer_widgets_t::color_history_valid, DT_DRAWLAYER_COLOR_HISTORY_COUNT, FALSE, i, and TRUE.
Referenced by _remember_display_color().
| void dt_drawlayer_widgets_set_brush_profile_preview | ( | dt_drawlayer_widgets_t * | widgets, |
| const float | opacity, | ||
| const float | hardness, | ||
| const float | sprinkles, | ||
| const float | sprinkle_size, | ||
| const float | sprinkle_coarseness, | ||
| const int | selected_shape | ||
| ) |
Update cached brush-profile preview parameters and selected profile.
References _clamp01(), DT_DRAWLAYER_BRUSH_SHAPE_LINEAR, DT_DRAWLAYER_BRUSH_SHAPE_SIGMOIDAL, dt_drawlayer_widgets_t::profile_hardness, dt_drawlayer_widgets_t::profile_opacity, dt_drawlayer_widgets_t::profile_selected_shape, dt_drawlayer_widgets_t::profile_sprinkle_coarseness, dt_drawlayer_widgets_t::profile_sprinkle_size, dt_drawlayer_widgets_t::profile_sprinkles, dt_drawlayer_widgets_t::profile_surface_dirty, and TRUE.
Referenced by _sync_brush_profile_preview_widget().
| void dt_drawlayer_widgets_set_color_history | ( | dt_drawlayer_widgets_t * | widgets, |
| const float | history[DT_DRAWLAYER_COLOR_HISTORY_COUNT][3], | ||
| const gboolean | valid[DT_DRAWLAYER_COLOR_HISTORY_COUNT] | ||
| ) |
Replace full color-history content and validity flags.
References _clamp01(), dt_drawlayer_widgets_t::color_history, dt_drawlayer_widgets_t::color_history_valid, DT_DRAWLAYER_COLOR_HISTORY_COUNT, and i.
Referenced by _load_color_history().
| void dt_drawlayer_widgets_set_display_color | ( | dt_drawlayer_widgets_t * | widgets, |
| const float | display_rgb[3] | ||
| ) |
Set current color and synchronize picker internals.
Set current display RGB color and refresh picker state.
References _sync_picker_from_display_rgb(), dt_drawlayer_widgets_t::color_surface_dirty, and TRUE.
Referenced by _apply_display_brush_color(), and _sync_color_picker_from_conf().
| gboolean dt_drawlayer_widgets_update_from_picker_position | ( | dt_drawlayer_widgets_t * | widgets, |
| GtkWidget * | widget, | ||
| float | x, | ||
| float | y, | ||
| float | display_rgb[3] | ||
| ) |
Update picker state from mouse position and return selected color.
Update picker selection from widget coordinates during drag.
References _clamp01(), _color_picker_geometry(), _color_picker_hit_margin(), _picker_clamp_state_to_gamut(), _picker_project_opponent_to_display_rgb(), _rect_contains_with_margin(), dt_drawlayer_widgets_t::color_surface_dirty, DT_DRAWLAYER_COLOR_DRAG_DISC, DT_DRAWLAYER_COLOR_DRAG_NONE, DT_DRAWLAYER_COLOR_DRAG_PLANE, DT_DRAWLAYER_PICKER_C_MAX, DT_DRAWLAYER_PICKER_U_MAX, DT_DRAWLAYER_PICKER_V_MAX, FALSE, dt_drawlayer_widgets_t::picker_chroma, dt_drawlayer_widgets_t::picker_drag_mode, dt_drawlayer_widgets_t::picker_hue, dt_drawlayer_widgets_t::picker_m, dt_drawlayer_widgets_t::picker_u, dt_drawlayer_widgets_t::picker_v, TRUE, and x.
Referenced by _color_picker_set_from_position().