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
 

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]
 

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, const 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_t *pipe, 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)
 Refresh GUI controls from current params and configuration.
 
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)
 
static void _generate_curve_lut (const 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)
 
int process (struct dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece, const void *const ivoid, void *const ovoid)
 

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_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

◆ _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()

static gboolean _area_key_press_callback ( GtkWidget widget,
GdkEventKey *  event,
dt_iop_module_t self 
)
static

◆ _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 r, and TRUE.

Referenced by gui_init().

◆ _area_scrolled_callback()

static gboolean _area_scrolled_callback ( GtkWidget widget,
GdkEventScroll *  event,
dt_iop_module_t self 
)
static

◆ _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, p, 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()

◆ _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, g, and dt_iop_module_t::gui_data.

Referenced by gui_init().

◆ cleanup_pipe()

◆ color_picker_apply()

◆ commit_params()

◆ default_colorspace()

int default_colorspace ( dt_iop_module_t self,
dt_dev_pixelpipe_t pipe,
const 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()

void gui_update ( struct dt_iop_module_t self)

◆ init()

◆ 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