![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#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>
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) |
#define DT_ZONESYSTEM_BAR_SPLIT_WIDTH 0.0 |
#define DT_ZONESYSTEM_INSET DT_PIXEL_APPLY_DPI(5) |
#define DT_ZONESYSTEM_REFERENCE_SPLIT 0.30 |
#define MAX_ZONE_SYSTEM_SIZE 24 |
typedef struct dt_iop_zonesystem_data_t dt_iop_zonesystem_data_t |
and pixelpipe data is just the same
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 |
typedef struct dt_iop_zonesystem_params_t dt_iop_zonesystem_params_t |
gui params.
|
inlinestatic |
References size.
Referenced by commit_params(), dt_iop_zonesystem_bar_button_press(), dt_iop_zonesystem_bar_draw(), dt_iop_zonesystem_bar_motion_notify(), and dt_iop_zonesystem_preview_draw().
|
static |
References dt_control_queue_redraw_widget(), and dt_iop_module_t::gui_data.
Referenced by gui_cleanup(), and gui_init().
|
inlinestatic |
References size.
Referenced by dt_iop_zonesystem_bar_button_press().
void cleanup_global | ( | dt_iop_module_so_t * | module | ) |
void cleanup_pipe | ( | struct dt_iop_module_t * | self, |
dt_dev_pixelpipe_t * | pipe, | ||
dt_dev_pixelpipe_iop_t * | piece | ||
) |
References dt_dev_pixelpipe_iop_t::data.
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 default_colorspace | ( | dt_iop_module_t * | self, |
dt_dev_pixelpipe_t * | pipe, | ||
dt_dev_pixelpipe_iop_t * | piece | ||
) |
References IOP_CS_LAB.
int default_group | ( | ) |
References IOP_GROUP_TONES.
const char * deprecated_msg | ( | ) |
|
static |
|
static |
References FALSE, dt_iop_module_t::gui_data, and TRUE.
Referenced by gui_init().
|
static |
References _iop_zonesystem_calculate_zonemap(), dt_cairo_image_surface_create(), DT_PIXEL_APPLY_DPI, DT_ZONESYSTEM_BAR_SPLIT_WIDTH, DT_ZONESYSTEM_INSET, DT_ZONESYSTEM_REFERENCE_SPLIT, dt_iop_module_t::gui_data, height, MAX_ZONE_SYSTEM_SIZE, dt_iop_module_t::params, TRUE, and width.
Referenced by gui_init().
|
static |
References FALSE, dt_iop_module_t::gui_data, and TRUE.
Referenced by gui_init().
|
static |
References _iop_zonesystem_calculate_zonemap(), darktable, darktable_t::develop, dt_dev_add_history_item, DT_ZONESYSTEM_INSET, DT_ZONESYSTEM_REFERENCE_SPLIT, FALSE, dt_iop_module_t::gui_data, height, MAX_ZONE_SYSTEM_SIZE, dt_iop_module_t::params, TRUE, dt_iop_module_t::widget, and width.
Referenced by gui_init().
|
static |
References darktable, darktable_t::develop, dt_dev_add_history_item, dt_gui_get_scroll_unit_deltas(), MAX_ZONE_SYSTEM_SIZE, dt_iop_module_t::params, and TRUE.
Referenced by gui_init().
|
static |
References _iop_zonesystem_calculate_zonemap(), CLIP, dt_cairo_image_surface_create(), dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), DT_PIXEL_APPLY_DPI, dt_iop_module_t::enabled, dt_iop_module_t::expander, dt_iop_module_t::gui_data, height, MAX_ZONE_SYSTEM_SIZE, dt_iop_module_t::params, TRUE, and width.
Referenced by gui_init().
int flags | ( | ) |
void gui_cleanup | ( | struct dt_iop_module_t * | self | ) |
void gui_init | ( | struct dt_iop_module_t * | self | ) |
References _iop_zonesystem_redraw_preview_callback(), darktable, DT_DEBUG_CONTROL_SIGNAL_CONNECT, DT_GUI_IOP_MODULE_CONTROL_SPACING, dt_iop_zonesystem_bar_button_press(), dt_iop_zonesystem_bar_button_release(), dt_iop_zonesystem_bar_draw(), dt_iop_zonesystem_bar_leave_notify(), dt_iop_zonesystem_bar_motion_notify(), dt_iop_zonesystem_bar_scrolled(), dt_iop_zonesystem_preview_draw(), DT_PIXEL_APPLY_DPI, DT_SIGNAL_DEVELOP_PREVIEW_PIPE_FINISHED, dtgtk_drawing_area_new_with_aspect_ratio(), FALSE, darktable_t::gui, IOP_GUI_ALLOC, dt_gui_gtk_t::scroll_mask, darktable_t::signals, size_allocate_callback(), TRUE, and dt_iop_module_t::widget.
void gui_update | ( | struct dt_iop_module_t * | self | ) |
References dt_iop_module_t::gui_data.
void init_global | ( | dt_iop_module_so_t * | module | ) |
void init_pipe | ( | struct dt_iop_module_t * | self, |
dt_dev_pixelpipe_t * | pipe, | ||
dt_dev_pixelpipe_iop_t * | piece | ||
) |
References dt_dev_pixelpipe_iop_t::data, and dt_dev_pixelpipe_iop_t::data_size.
const char * name | ( | ) |
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 | ||
) |
References CLAMPS, dt_dev_pixelpipe_iop_t::colors, dt_dev_pixelpipe_iop_t::data, dt_iop_have_required_input_format(), for_each_channel, dt_iop_roi_t::height, dt_iop_zonesystem_data_t::params, process_common_cleanup(), process_common_setup(), dt_iop_zonesystem_data_t::rzscale, size, dt_iop_zonesystem_params_t::size, dt_iop_roi_t::width, dt_iop_zonesystem_data_t::zonemap_offset, and dt_iop_zonesystem_data_t::zonemap_scale.
|
static |
References CLAMPS, dt_dev_pixelpipe_iop_t::colors, dt_dev_pixelpipe_iop_t::data, dt_iop_module_t::dev, DT_DEV_PIXELPIPE_DISPLAY_MASK, DT_DEV_PIXELPIPE_PREVIEW, dt_gaussian_blur(), dt_gaussian_free(), dt_gaussian_init(), dt_iop_alpha_copy(), DT_IOP_GAUSSIAN_ZERO, dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), dt_develop_t::gui_attached, dt_iop_module_t::gui_data, height, dt_iop_roi_t::height, dt_iop_zonesystem_data_t::params, dt_dev_pixelpipe_iop_t::pipe, dt_iop_roi_t::scale, size, dt_iop_zonesystem_params_t::size, width, and dt_iop_roi_t::width.
Referenced by process().
|
static |
References dt_iop_module_t::dev, DT_DEV_PIXELPIPE_PREVIEW, dt_iop_gui_enter_critical_section(), dt_iop_gui_leave_critical_section(), dt_develop_t::gui_attached, dt_iop_module_t::gui_data, height, dt_iop_roi_t::height, dt_dev_pixelpipe_iop_t::pipe, width, and dt_iop_roi_t::width.
Referenced by process().
|
static |
References dt_util_get_logo(), dt_iop_module_t::gui_data, and MIN.
Referenced by gui_init().