Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
rgbcurve.c File Reference
+ Include dependency graph for rgbcurve.c:

Data Structures

struct  dt_iop_rgbcurve_node_t
 
struct  dt_iop_rgbcurve_params_t
 
struct  dt_iop_rgbcurve_gui_data_t
 
struct  dt_iop_rgbcurve_data_t
 
struct  dt_iop_rgbcurve_global_data_t
 

Macros

#define DT_GUI_CURVE_EDITOR_INSET   DT_PIXEL_APPLY_DPI(1)
 
#define DT_IOP_RGBCURVE_RES   256
 
#define DT_IOP_RGBCURVE_MAXNODES   20
 
#define DT_IOP_RGBCURVE_MIN_X_DISTANCE   0.0025f
 
#define DT_IOP_COLOR_ICC_LEN   512
 
#define RGBCURVE_DEFAULT_STEP   (0.001f)
 

Typedefs

typedef enum rgbcurve_channel_t rgbcurve_channel_t
 
typedef enum dt_iop_rgbcurve_autoscale_t dt_iop_rgbcurve_autoscale_t
 
typedef struct dt_iop_rgbcurve_node_t dt_iop_rgbcurve_node_t
 
typedef struct dt_iop_rgbcurve_params_t dt_iop_rgbcurve_params_t
 
typedef struct dt_iop_rgbcurve_gui_data_t dt_iop_rgbcurve_gui_data_t
 
typedef struct dt_iop_rgbcurve_data_t dt_iop_rgbcurve_data_t
 
typedef float(* _curve_table_ptr)[0x10000]
 
typedef float(* _coeffs_table_ptr)[3]
 
typedef struct dt_iop_rgbcurve_global_data_t dt_iop_rgbcurve_global_data_t
 

Enumerations

enum  rgbcurve_channel_t {
  DT_IOP_RGBCURVE_R = 0 ,
  DT_IOP_RGBCURVE_G = 1 ,
  DT_IOP_RGBCURVE_B = 2 ,
  DT_IOP_RGBCURVE_MAX_CHANNELS = 3
}
 
enum  dt_iop_rgbcurve_autoscale_t {
  DT_S_SCALE_AUTOMATIC_RGB = 0 ,
  DT_S_SCALE_MANUAL_RGB = 1
}
 

Functions

const char * name ()
 
int default_group ()
 
int flags ()
 
int default_colorspace (dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece)
 
const char ** description (struct dt_iop_module_t *self)
 
void init_presets (dt_iop_module_so_t *self)
 
static float _curve_to_mouse (const float x, const float zoom_factor, const float offset)
 
static float _mouse_to_curve (const float x, const float zoom_factor, const float offset)
 
static void picker_scale (const float *const in, float *out, dt_iop_rgbcurve_params_t *p, const dt_iop_order_iccprofile_info_t *const work_profile)
 
static void _rgbcurve_show_hide_controls (dt_iop_rgbcurve_params_t *p, dt_iop_rgbcurve_gui_data_t *g)
 
static gboolean _is_identity (dt_iop_rgbcurve_params_t *p, rgbcurve_channel_t channel)
 
void gui_changed (dt_iop_module_t *self, GtkWidget *w, void *previous)
 
static void interpolator_callback (GtkWidget *widget, dt_iop_module_t *self)
 
static void tab_switch_callback (GtkNotebook *notebook, GtkWidget *page, guint page_num, gpointer user_data)
 
static gboolean _area_resized_callback (GtkWidget *widget, GdkEvent *event, gpointer user_data)
 
static int _add_node (dt_iop_rgbcurve_node_t *curve_nodes, int *nodes, float x, float y)
 
static int _add_node_from_picker (dt_iop_rgbcurve_params_t *p, const float *const in, const float increment, const int ch, const dt_iop_order_iccprofile_info_t *const work_profile)
 
void color_picker_apply (dt_iop_module_t *self, GtkWidget *picker, dt_dev_pixelpipe_iop_t *piece)
 
static gboolean _sanity_check (const float x, const int selected, const int nodes, const dt_iop_rgbcurve_node_t *curve)
 
static gboolean _move_point_internal (dt_iop_module_t *self, GtkWidget *widget, float dx, float dy, guint state)
 
static gboolean _area_scrolled_callback (GtkWidget *widget, GdkEventScroll *event, dt_iop_module_t *self)
 
static gboolean _area_key_press_callback (GtkWidget *widget, GdkEventKey *event, dt_iop_module_t *self)
 
static gboolean _area_enter_notify_callback (GtkWidget *widget, GdkEventCrossing *event, gpointer user_data)
 
static gboolean _area_leave_notify_callback (GtkWidget *widget, GdkEventCrossing *event, gpointer user_data)
 
static gboolean _area_draw_callback (GtkWidget *widget, cairo_t *crf, dt_iop_module_t *self)
 
static gboolean _area_motion_notify_callback (GtkWidget *widget, GdkEventMotion *event, dt_iop_module_t *self)
 
static gboolean _area_button_press_callback (GtkWidget *widget, GdkEventButton *event, dt_iop_module_t *self)
 
void gui_reset (struct dt_iop_module_t *self)
 
void change_image (struct dt_iop_module_t *self)
 
void gui_init (struct dt_iop_module_t *self)
 
void gui_update (struct dt_iop_module_t *self)
 
void gui_cleanup (struct dt_iop_module_t *self)
 
void init_pipe (struct dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece)
 
void cleanup_pipe (struct dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece)
 
void init (dt_iop_module_t *module)
 
void init_global (dt_iop_module_so_t *module)
 
void cleanup_global (dt_iop_module_so_t *module)
 
static void _generate_curve_lut (dt_dev_pixelpipe_t *pipe, dt_iop_rgbcurve_data_t *d)
 
void commit_params (struct dt_iop_module_t *self, dt_iop_params_t *p1, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece)
 
void process (struct dt_iop_module_t *self, dt_dev_pixelpipe_iop_t *piece, const void *const ivoid, void *const ovoid, const dt_iop_roi_t *const roi_in, const dt_iop_roi_t *const roi_out)
 

Macro Definition Documentation

◆ DT_GUI_CURVE_EDITOR_INSET

#define DT_GUI_CURVE_EDITOR_INSET   DT_PIXEL_APPLY_DPI(1)

◆ DT_IOP_COLOR_ICC_LEN

#define DT_IOP_COLOR_ICC_LEN   512

◆ DT_IOP_RGBCURVE_MAXNODES

#define DT_IOP_RGBCURVE_MAXNODES   20

◆ DT_IOP_RGBCURVE_MIN_X_DISTANCE

#define DT_IOP_RGBCURVE_MIN_X_DISTANCE   0.0025f

◆ DT_IOP_RGBCURVE_RES

#define DT_IOP_RGBCURVE_RES   256

◆ RGBCURVE_DEFAULT_STEP

#define RGBCURVE_DEFAULT_STEP   (0.001f)

Typedef Documentation

◆ _coeffs_table_ptr

typedef float(* _coeffs_table_ptr)[3]

◆ _curve_table_ptr

typedef float(* _curve_table_ptr)[0x10000]

◆ dt_iop_rgbcurve_autoscale_t

◆ dt_iop_rgbcurve_data_t

◆ dt_iop_rgbcurve_global_data_t

◆ dt_iop_rgbcurve_gui_data_t

◆ dt_iop_rgbcurve_node_t

◆ dt_iop_rgbcurve_params_t

◆ rgbcurve_channel_t

Enumeration Type Documentation

◆ dt_iop_rgbcurve_autoscale_t

Enumerator
DT_S_SCALE_AUTOMATIC_RGB 
DT_S_SCALE_MANUAL_RGB 

◆ rgbcurve_channel_t

Enumerator
DT_IOP_RGBCURVE_R 
DT_IOP_RGBCURVE_G 
DT_IOP_RGBCURVE_B 
DT_IOP_RGBCURVE_MAX_CHANNELS 

Function Documentation

◆ _add_node()

static int _add_node ( dt_iop_rgbcurve_node_t curve_nodes,
int *  nodes,
float  x,
float  y 
)
inlinestatic

◆ _add_node_from_picker()

◆ _area_button_press_callback()

◆ _area_draw_callback()

static gboolean _area_draw_callback ( GtkWidget *  widget,
cairo_t *  crf,
dt_iop_module_t self 
)
static

References _curve_to_mouse(), darktable_t::bauhaus, dt_lib_t::colorpicker, dt_develop_t::darkroom_skip_mouse_events, darktable, dt_iop_module_t::dev, darktable_t::develop, dt_cairo_image_surface_create(), dt_draw_curve_add_point(), dt_draw_curve_calc_values(), dt_draw_curve_destroy(), dt_draw_curve_new(), dt_draw_curve_set_point(), dt_draw_grid_zoomed(), dt_draw_histogram_8_zoomed(), DT_GUI_CURVE_EDITOR_INSET, dt_iop_estimate_exp(), dt_iop_eval_exp(), DT_IOP_RGBCURVE_B, DT_IOP_RGBCURVE_G, DT_IOP_RGBCURVE_MAX_CHANNELS, DT_IOP_RGBCURVE_R, DT_IOP_RGBCURVE_RES, dt_ioppr_get_iop_work_profile_info(), dt_ioppr_get_pipe_output_profile_info(), dt_ioppr_transform_image_colorspace_rgb(), DT_LIB_COLORPICKER_STATISTIC_MAX, DT_LIB_COLORPICKER_STATISTIC_MEAN, DT_LIB_COLORPICKER_STATISTIC_MIN, DT_PIXEL_APPLY_DPI, DT_REQUEST_COLORPICK_OFF, DT_S_SCALE_AUTOMATIC_RGB, DT_S_SCALE_MANUAL_RGB, dt_iop_module_t::enabled, FALSE, dt_bauhaus_t::graph_colors, dt_iop_module_t::gui_data, height, dt_iop_module_t::histogram, dt_iop_module_t::histogram_max, dt_develop_t::iop, darktable_t::lib, dt_lib_t::live_samples, M_PI, dt_bauhaus_t::pango_font_desc, dt_iop_module_t::params, dt_iop_module_t::picked_color, dt_iop_module_t::picked_color_max, dt_iop_module_t::picked_color_min, dt_iop_module_t::picked_output_color, picker_scale(), dt_develop_t::pipe, dt_lib_t::proxy, dt_iop_module_t::request_color_pick, dt_colorpicker_sample_t::scope, set_color(), TRUE, width, dt_iop_rgbcurve_node_t::x, and dt_iop_rgbcurve_node_t::y.

Referenced by gui_init().

◆ _area_enter_notify_callback()

static gboolean _area_enter_notify_callback ( GtkWidget *  widget,
GdkEventCrossing *  event,
gpointer  user_data 
)
static

References TRUE.

Referenced by gui_init().

◆ _area_key_press_callback()

◆ _area_leave_notify_callback()

static gboolean _area_leave_notify_callback ( GtkWidget *  widget,
GdkEventCrossing *  event,
gpointer  user_data 
)
static

References TRUE.

Referenced by gui_init().

◆ _area_motion_notify_callback()

◆ _area_resized_callback()

static gboolean _area_resized_callback ( GtkWidget *  widget,
GdkEvent *  event,
gpointer  user_data 
)
static

References TRUE.

Referenced by gui_init().

◆ _area_scrolled_callback()

◆ _curve_to_mouse()

static float _curve_to_mouse ( const float  x,
const float  zoom_factor,
const float  offset 
)
static

◆ _generate_curve_lut()

◆ _is_identity()

static gboolean _is_identity ( dt_iop_rgbcurve_params_t p,
rgbcurve_channel_t  channel 
)
static

References FALSE, and TRUE.

Referenced by gui_changed().

◆ _mouse_to_curve()

static float _mouse_to_curve ( const float  x,
const float  zoom_factor,
const float  offset 
)
static

◆ _move_point_internal()

static gboolean _move_point_internal ( dt_iop_module_t self,
GtkWidget *  widget,
float  dx,
float  dy,
guint  state 
)
static

◆ _rgbcurve_show_hide_controls()

static void _rgbcurve_show_hide_controls ( dt_iop_rgbcurve_params_t p,
dt_iop_rgbcurve_gui_data_t g 
)
static

◆ _sanity_check()

static gboolean _sanity_check ( const float  x,
const int  selected,
const int  nodes,
const dt_iop_rgbcurve_node_t curve 
)
static

◆ change_image()

void change_image ( struct dt_iop_module_t self)

References DT_IOP_RGBCURVE_R, and dt_iop_module_t::gui_data.

Referenced by gui_init().

◆ cleanup_global()

◆ cleanup_pipe()

◆ color_picker_apply()

◆ commit_params()

◆ default_colorspace()

int default_colorspace ( dt_iop_module_t self,
dt_dev_pixelpipe_t pipe,
dt_dev_pixelpipe_iop_t piece 
)

References IOP_CS_RGB.

◆ default_group()

int default_group ( )

References IOP_GROUP_COLOR.

◆ description()

const char ** description ( struct dt_iop_module_t self)

◆ flags()

int flags ( )

◆ gui_changed()

◆ gui_cleanup()

◆ gui_init()

◆ gui_reset()

◆ gui_update()

◆ init()

◆ init_global()

◆ init_pipe()

◆ init_presets()

◆ interpolator_callback()

◆ name()

const char * name ( )

◆ picker_scale()

◆ process()

◆ tab_switch_callback()

static void tab_switch_callback ( GtkNotebook *  notebook,
GtkWidget *  page,
guint  page_num,
gpointer  user_data 
)
static