Ansel 0.0
A darktable fork - bloat + design vision
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
zonesystem.c File Reference
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include "common/darktable.h"
#include "common/gaussian.h"
#include "common/math.h"
#include "common/opencl.h"
#include "control/conf.h"
#include "control/control.h"
#include "develop/develop.h"
#include "develop/imageop.h"
#include "develop/imageop_math.h"
#include "dtgtk/drawingarea.h"
#include "dtgtk/gradientslider.h"
#include "dtgtk/togglebutton.h"
#include "gui/gtk.h"
#include "gui/presets.h"
#include "iop/iop_api.h"
#include <librsvg/rsvg.h>
#include <librsvg/rsvg-cairo.h>
+ Include dependency graph for zonesystem.c:

Data Structures

struct  dt_iop_zonesystem_params_t
 
struct  dt_iop_zonesystem_data_t
 
struct  dt_iop_zonesystem_global_data_t
 
struct  dt_iop_zonesystem_gui_data_t
 

Macros

#define MAX_ZONE_SYSTEM_SIZE   24
 
#define DT_ZONESYSTEM_INSET   DT_PIXEL_APPLY_DPI(5)
 
#define DT_ZONESYSTEM_BAR_SPLIT_WIDTH   0.0
 
#define DT_ZONESYSTEM_REFERENCE_SPLIT   0.30
 

Typedefs

typedef struct dt_iop_zonesystem_params_t dt_iop_zonesystem_params_t
 
typedef struct dt_iop_zonesystem_data_t dt_iop_zonesystem_data_t
 
typedef struct dt_iop_zonesystem_global_data_t dt_iop_zonesystem_global_data_t
 
typedef struct dt_iop_zonesystem_gui_data_t dt_iop_zonesystem_gui_data_t
 

Functions

const char * name ()
 
int flags ()
 
const char * deprecated_msg ()
 
int default_group ()
 
int default_colorspace (dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece)
 
static int _iop_zonesystem_zone_index_from_lightness (float lightness, float *zonemap, int size)
 
static void _iop_zonesystem_calculate_zonemap (struct dt_iop_zonesystem_params_t *p, float *zonemap)
 
static void process_common_setup (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)
 
static void process_common_cleanup (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)
 
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)
 
void init_global (dt_iop_module_so_t *module)
 
void cleanup_global (dt_iop_module_so_t *module)
 
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 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 gui_update (struct dt_iop_module_t *self)
 
static void _iop_zonesystem_redraw_preview_callback (gpointer instance, gpointer user_data)
 
static gboolean dt_iop_zonesystem_preview_draw (GtkWidget *widget, cairo_t *crf, dt_iop_module_t *self)
 
static gboolean dt_iop_zonesystem_bar_draw (GtkWidget *widget, cairo_t *crf, dt_iop_module_t *self)
 
static gboolean dt_iop_zonesystem_bar_motion_notify (GtkWidget *widget, GdkEventMotion *event, dt_iop_module_t *self)
 
static gboolean dt_iop_zonesystem_bar_leave_notify (GtkWidget *widget, GdkEventCrossing *event, dt_iop_module_t *self)
 
static gboolean dt_iop_zonesystem_bar_button_press (GtkWidget *widget, GdkEventButton *event, dt_iop_module_t *self)
 
static gboolean dt_iop_zonesystem_bar_button_release (GtkWidget *widget, GdkEventButton *event, dt_iop_module_t *self)
 
static gboolean dt_iop_zonesystem_bar_scrolled (GtkWidget *widget, GdkEventScroll *event, dt_iop_module_t *self)
 
static void size_allocate_callback (GtkWidget *widget, GtkAllocation *allocation, gpointer user_data)
 
void gui_init (struct dt_iop_module_t *self)
 
void gui_cleanup (struct dt_iop_module_t *self)
 

Macro Definition Documentation

◆ DT_ZONESYSTEM_BAR_SPLIT_WIDTH

#define DT_ZONESYSTEM_BAR_SPLIT_WIDTH   0.0

◆ DT_ZONESYSTEM_INSET

#define DT_ZONESYSTEM_INSET   DT_PIXEL_APPLY_DPI(5)

◆ DT_ZONESYSTEM_REFERENCE_SPLIT

#define DT_ZONESYSTEM_REFERENCE_SPLIT   0.30

◆ MAX_ZONE_SYSTEM_SIZE

#define MAX_ZONE_SYSTEM_SIZE   24

Typedef Documentation

◆ dt_iop_zonesystem_data_t

and pixelpipe data is just the same

◆ dt_iop_zonesystem_global_data_t

◆ dt_iop_zonesystem_gui_data_t

◆ dt_iop_zonesystem_params_t

Function Documentation

◆ _iop_zonesystem_calculate_zonemap()

static void _iop_zonesystem_calculate_zonemap ( struct dt_iop_zonesystem_params_t p,
float *  zonemap 
)
inlinestatic

◆ _iop_zonesystem_redraw_preview_callback()

void _iop_zonesystem_redraw_preview_callback ( gpointer  instance,
gpointer  user_data 
)
static

◆ _iop_zonesystem_zone_index_from_lightness()

static int _iop_zonesystem_zone_index_from_lightness ( float  lightness,
float *  zonemap,
int  size 
)
inlinestatic

References size.

Referenced by dt_iop_zonesystem_bar_button_press().

◆ cleanup_global()

◆ cleanup_pipe()

void cleanup_pipe ( struct dt_iop_module_t self,
dt_dev_pixelpipe_t pipe,
dt_dev_pixelpipe_iop_t piece 
)

◆ 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_LAB.

◆ default_group()

int default_group ( )

References IOP_GROUP_TONES.

◆ deprecated_msg()

const char * deprecated_msg ( )

◆ dt_iop_zonesystem_bar_button_press()

static gboolean dt_iop_zonesystem_bar_button_press ( GtkWidget *  widget,
GdkEventButton *  event,
dt_iop_module_t self 
)
static

◆ dt_iop_zonesystem_bar_button_release()

static gboolean dt_iop_zonesystem_bar_button_release ( GtkWidget *  widget,
GdkEventButton *  event,
dt_iop_module_t self 
)
static

References FALSE, dt_iop_module_t::gui_data, and TRUE.

Referenced by gui_init().

◆ dt_iop_zonesystem_bar_draw()

◆ dt_iop_zonesystem_bar_leave_notify()

static gboolean dt_iop_zonesystem_bar_leave_notify ( GtkWidget *  widget,
GdkEventCrossing *  event,
dt_iop_module_t self 
)
static

References FALSE, dt_iop_module_t::gui_data, and TRUE.

Referenced by gui_init().

◆ dt_iop_zonesystem_bar_motion_notify()

static gboolean dt_iop_zonesystem_bar_motion_notify ( GtkWidget *  widget,
GdkEventMotion *  event,
dt_iop_module_t self 
)
static

◆ dt_iop_zonesystem_bar_scrolled()

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

◆ dt_iop_zonesystem_preview_draw()

◆ flags()

◆ gui_cleanup()

◆ gui_init()

◆ gui_update()

void gui_update ( struct dt_iop_module_t self)

◆ init_global()

◆ init_pipe()

◆ name()

const char * name ( )

◆ process()

◆ process_common_cleanup()

◆ process_common_setup()

◆ size_allocate_callback()

static void size_allocate_callback ( GtkWidget *  widget,
GtkAllocation *  allocation,
gpointer  user_data 
)
static

References dt_util_get_logo(), dt_iop_module_t::gui_data, and MIN.

Referenced by gui_init().