![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include <stdint.h>
#include "bauhaus/bauhaus.h"
#include "common/atomic.h"
#include "common/color_vocabulary.h"
#include "common/darktable.h"
#include "common/debug.h"
#include "common/histogram.h"
#include "common/iop_profile.h"
#include "common/imagebuf.h"
#include "common/image_cache.h"
#include "common/math.h"
#include "control/conf.h"
#include "control/control.h"
#include "develop/develop.h"
#include "dtgtk/drawingarea.h"
#include "dtgtk/button.h"
#include "gui/color_picker_proxy.h"
#include "gui/draw.h"
#include "gui/gtk.h"
#include "libs/lib.h"
#include "libs/lib_api.h"
#include "libs/colorpicker.h"
Data Structures | |
struct | dt_lib_histogram_cache_t |
struct | dt_lib_histogram_t |
Macros | |
#define | HISTOGRAM_BINS 256 |
#define | TONES 128 |
#define | GAMMA 1.f / 1.5f |
Typedefs | |
typedef enum dt_lib_histogram_scope_type_t | dt_lib_histogram_scope_type_t |
typedef struct dt_lib_histogram_cache_t | dt_lib_histogram_cache_t |
typedef enum dt_lib_colorpicker_model_t | dt_lib_colorpicker_model_t |
typedef struct dt_lib_histogram_t | dt_lib_histogram_t |
Functions | |
const char * | name (struct dt_lib_module_t *self) |
const char ** | views (dt_lib_module_t *self) |
uint32_t | container (dt_lib_module_t *self) |
int | expandable (dt_lib_module_t *self) |
int | position () |
static void | _update_picker_output (dt_lib_module_t *self) |
static void | _update_samples_output (dt_lib_module_t *self) |
static void | _update_sample_label (dt_lib_module_t *self, dt_colorpicker_sample_t *sample) |
dt_backbuf_t * | _get_backuf (dt_develop_t *dev, const char *op) |
void | _backbuf_int_to_op (const int value, dt_lib_histogram_t *d) |
int | _backbuf_op_to_int (dt_lib_histogram_t *d) |
void | _scope_pixel_to_xyz (const dt_aligned_pixel_t rgb_in, dt_aligned_pixel_t xyz_out, dt_lib_histogram_t *d) |
void | _scope_pixel_to_display_rgb (const dt_aligned_pixel_t rgb_in, dt_aligned_pixel_t rgb_out, dt_lib_histogram_t *d) |
void | _reset_cache (dt_lib_histogram_t *d) |
static gboolean | _is_backbuf_ready (dt_lib_histogram_t *d) |
static void | _redraw_scopes (dt_lib_histogram_t *d) |
uint32_t | _find_max_histogram (const uint32_t *const restrict bins, const size_t binning_size) |
static void | _bin_pixels_histogram_in_roi (const float *const restrict image, uint32_t *const restrict bins, const size_t min_x, const size_t max_x, const size_t min_y, const size_t max_y, const size_t width) |
static void | _bin_pickers_histogram (const float *const restrict image, const size_t width, const size_t height, uint32_t *bins, dt_colorpicker_sample_t *sample) |
static void | _process_histogram (dt_backbuf_t *backbuf, cairo_t *cr, const int width, const int height) |
static void | _bin_pixels_waveform_in_roi (const float *const restrict image, uint32_t *const restrict bins, const size_t min_x, const size_t max_x, const size_t min_y, const size_t max_y, const size_t width, const size_t binning_size, const gboolean vertical) |
static void | _bin_pickers_waveforms (const float *const restrict image, uint32_t *const restrict bins, const size_t width, const size_t height, const size_t binning_size, const gboolean vertical, dt_colorpicker_sample_t *sample) |
static void | _bin_pixels_waveform (const float *const restrict image, uint32_t *const restrict bins, const size_t width, const size_t height, const size_t binning_size, const gboolean vertical) |
static void | _create_waveform_image (const uint32_t *const restrict bins, uint8_t *const restrict image, const uint32_t max_hist, const size_t width, const size_t height) |
static void | _mask_waveform (const uint8_t *const restrict image, uint8_t *const restrict masked, const size_t width, const size_t height, const size_t channel) |
static void | _paint_waveform (cairo_t *cr, uint8_t *const restrict image, const int width, const int height, const size_t img_width, const size_t img_height, const gboolean vertical) |
static void | _paint_parade (cairo_t *cr, uint8_t *const restrict image, const int width, const int height, const size_t img_width, const size_t img_height, const gboolean vertical) |
static void | _process_waveform (dt_backbuf_t *backbuf, cairo_t *cr, const int width, const int height, const gboolean vertical, const gboolean parade) |
static float | _Luv_to_vectorscope_coord_zoom (const float value, const float zoom) |
static float | _vectorscope_coord_zoom_to_Luv (const float value, const float zoom) |
static void | _bin_pixels_vectorscope_in_roi (const float *const restrict image, uint32_t *const restrict vectorscope, const size_t min_x, const size_t max_x, const size_t min_y, const size_t max_y, const size_t width, const float zoom, dt_lib_histogram_t *d) |
static void | _bin_pickers_vectorscope (const float *const restrict image, uint32_t *const restrict vectorscope, const size_t width, const size_t height, const float zoom, dt_lib_histogram_t *d, const dt_colorpicker_sample_t *const sample) |
static void | _create_vectorscope_image (const uint32_t *const restrict vectorscope, uint8_t *const restrict image, const uint32_t max_hist, const float zoom) |
static void | _bin_vectorscope (const float *const restrict image, uint32_t *const vectorscope, const size_t width, const size_t height, const float zoom, dt_lib_histogram_t *d) |
static void | _process_vectorscope (dt_backbuf_t *backbuf, cairo_t *cr, const int width, const int height, const float zoom, dt_lib_histogram_t *d) |
gboolean | _needs_recompute (dt_lib_histogram_t *d, const int width, const int height) |
static gboolean | _draw_callback (GtkWidget *widget, cairo_t *crf, gpointer user_data) |
void | _get_allocation_size (dt_lib_histogram_t *d, int *width, int *height) |
gboolean | _redraw_surface (dt_lib_histogram_t *d) |
static void | _destroy_surface (dt_lib_histogram_t *d) |
gboolean | _trigger_recompute (dt_lib_histogram_t *d) |
static void | _pixelpipe_pick_from_image (const dt_backbuf_t *const backbuf, dt_colorpicker_sample_t *const sample, dt_lib_histogram_t *d) |
static void | _pixelpipe_pick_samples (dt_lib_histogram_t *d) |
static void | _update_everything (dt_lib_module_t *self) |
static void | _lib_histogram_preview_updated_callback (gpointer instance, dt_lib_module_t *self) |
void | view_enter (struct dt_lib_module_t *self, struct dt_view_t *old_view, struct dt_view_t *new_view) |
void | view_leave (struct dt_lib_module_t *self, struct dt_view_t *old_view, struct dt_view_t *new_view) |
void | _stage_callback (GtkWidget *widget, dt_lib_module_t *self) |
void | _display_callback (GtkWidget *widget, dt_lib_module_t *self) |
static void | _resize_callback (GtkWidget *widget, GdkRectangle *allocation, dt_lib_histogram_t *d) |
static gboolean | _area_scrolled_callback (GtkWidget *widget, GdkEventScroll *event, dt_lib_histogram_t *d) |
void | _set_params (dt_lib_histogram_t *d) |
static gboolean | _sample_draw_callback (GtkWidget *widget, cairo_t *cr, dt_colorpicker_sample_t *sample) |
static void | _picker_button_toggled (GtkToggleButton *button, dt_lib_histogram_t *d) |
static void | _update_size (dt_lib_module_t *self, dt_lib_colorpicker_size_t size) |
static void | _set_sample_box_area (dt_lib_module_t *self, const dt_boundingbox_t box) |
static void | _set_sample_point (dt_lib_module_t *self, const float pos[2]) |
static gboolean | _sample_tooltip_callback (GtkWidget *widget, gint x, gint y, gboolean keyboard_mode, GtkTooltip *tooltip, const dt_colorpicker_sample_t *sample) |
static void | _statistic_changed (GtkWidget *widget, dt_lib_module_t *self) |
static void | _color_mode_changed (GtkWidget *widget, dt_lib_module_t *self) |
static void | _label_size_allocate_callback (GtkWidget *widget, GdkRectangle *allocation, gpointer user_data) |
static gboolean | _sample_enter_callback (GtkWidget *widget, GdkEvent *event, dt_colorpicker_sample_t *sample) |
static gboolean | _sample_leave_callback (GtkWidget *widget, GdkEvent *event, gpointer data) |
static void | _remove_sample (dt_colorpicker_sample_t *sample) |
static void | _remove_sample_cb (GtkButton *widget, dt_colorpicker_sample_t *sample) |
static gboolean | _live_sample_button (GtkWidget *widget, GdkEventButton *event, dt_colorpicker_sample_t *sample) |
static void | _add_sample (GtkButton *widget, dt_lib_module_t *self) |
static void | _display_samples_changed (GtkToggleButton *button, dt_lib_module_t *self) |
static void | _restrict_histogram_changed (GtkToggleButton *button, dt_lib_module_t *self) |
void | gui_reset (dt_lib_module_t *self) |
void | gui_init (dt_lib_module_t *self) |
void | gui_cleanup (dt_lib_module_t *self) |
Variables | |
const gchar * | dt_lib_colorpicker_model_names [] = { N_("RGB"), N_("Lab"), N_("LCh"), N_("HSL"), N_("HSV"), N_("none"), NULL } |
const gchar * | dt_lib_colorpicker_statistic_names [] = { N_("mean"), N_("min"), N_("max"), NULL } |
#define HISTOGRAM_BINS 256 |
#define TONES 128 |
typedef enum dt_lib_colorpicker_model_t dt_lib_colorpicker_model_t |
typedef struct dt_lib_histogram_cache_t dt_lib_histogram_cache_t |
typedef struct dt_lib_histogram_t dt_lib_histogram_t |
|
static |
References _label_size_allocate_callback(), _live_sample_button(), _remove_sample_cb(), _sample_draw_callback(), _sample_enter_callback(), _sample_leave_callback(), _sample_tooltip_callback(), _update_everything(), dt_colorpicker_sample_t::color_patch, dt_lib_t::colorpicker, dt_colorpicker_sample_t::container, container(), darktable, dt_lib_module_t::data, dt_gui_add_class(), dtgtk_cairo_paint_remove(), dtgtk_togglebutton_new(), FALSE, darktable_t::lib, dt_lib_t::live_samples, dt_colorpicker_sample_t::locked, dt_colorpicker_sample_t::output_label, dt_lib_t::picker_proxy, dt_lib_histogram_t::primary_sample, dt_lib_t::proxy, dt_lib_histogram_t::samples_container, dt_lib_t::selected_sample, and TRUE.
Referenced by gui_init().
|
static |
void _backbuf_int_to_op | ( | const int | value, |
dt_lib_histogram_t * | d | ||
) |
References dt_lib_histogram_t::op.
Referenced by _stage_callback().
int _backbuf_op_to_int | ( | dt_lib_histogram_t * | d | ) |
References dt_lib_histogram_t::op.
Referenced by _scope_pixel_to_display_rgb(), _scope_pixel_to_xyz(), and _set_params().
|
inlinestatic |
References _bin_pixels_histogram_in_roi(), dt_colorpicker_sample_t::box, DT_LIB_COLORPICKER_SIZE_BOX, height, dt_colorpicker_sample_t::point, dt_colorpicker_sample_t::size, and width.
Referenced by _process_histogram().
|
inlinestatic |
References _bin_pixels_vectorscope_in_roi(), dt_colorpicker_sample_t::box, DT_LIB_COLORPICKER_SIZE_BOX, height, dt_colorpicker_sample_t::point, dt_colorpicker_sample_t::size, and width.
Referenced by _bin_vectorscope().
|
inlinestatic |
References _bin_pixels_waveform_in_roi(), dt_colorpicker_sample_t::box, DT_LIB_COLORPICKER_SIZE_BOX, height, dt_colorpicker_sample_t::point, dt_colorpicker_sample_t::size, and width.
Referenced by _bin_pixels_waveform().
|
inlinestatic |
References HISTOGRAM_BINS, and width.
Referenced by _bin_pickers_histogram(), and _process_histogram().
|
static |
References _Luv_to_vectorscope_coord_zoom(), _scope_pixel_to_xyz(), dt_xyY_to_Luv(), dt_XYZ_to_xyY(), HISTOGRAM_BINS, and width.
Referenced by _bin_pickers_vectorscope(), and _bin_vectorscope().
|
inlinestatic |
|
inlinestatic |
Referenced by _bin_pickers_waveforms(), and _bin_pixels_waveform().
|
static |
References _bin_pickers_vectorscope(), _bin_pixels_vectorscope_in_roi(), dt_lib_t::colorpicker, darktable, dt_conf_get_bool(), height, HISTOGRAM_BINS, darktable_t::lib, dt_lib_t::live_samples, dt_lib_t::picker_proxy, dt_lib_t::primary_sample, dt_lib_t::proxy, and width.
Referenced by _process_vectorscope().
|
static |
References _update_everything(), dt_lib_module_t::data, dt_bauhaus_combobox_get(), dt_conf_set_string(), dt_lib_colorpicker_model_names, and dt_lib_histogram_t::model.
Referenced by gui_init().
|
static |
References _vectorscope_coord_zoom_to_Luv(), darktable, darktable_t::develop, dt_apply_transposed_color_matrix(), dt_Luv_to_xyY(), dt_xyY_to_XYZ(), HISTOGRAM_BINS, dt_iop_order_iccprofile_info_t::matrix_out_transposed, dt_dev_pixelpipe_t::output_profile_info, and dt_develop_t::preview_pipe.
Referenced by _process_vectorscope().
|
static |
References GAMMA, height, and width.
Referenced by _process_waveform().
|
static |
References dt_lib_histogram_t::cst.
Referenced by _trigger_recompute(), gui_cleanup(), and gui_reset().
void _display_callback | ( | GtkWidget * | widget, |
dt_lib_module_t * | self | ||
) |
References _redraw_scopes(), _trigger_recompute(), dt_lib_module_t::data, dt_lib_histogram_t::display, dt_bauhaus_combobox_get(), and dt_conf_set_int().
Referenced by gui_init().
|
static |
References _update_everything(), dt_lib_t::colorpicker, darktable, dt_lib_t::display_samples, dt_conf_set_bool(), dt_control_queue_redraw_center(), darktable_t::lib, and dt_lib_t::proxy.
Referenced by gui_init().
|
static |
References dt_lib_histogram_t::cst.
Referenced by gui_init().
uint32_t _find_max_histogram | ( | const uint32_t *const restrict | bins, |
const size_t | binning_size | ||
) |
Referenced by _process_histogram(), _process_vectorscope(), and _process_waveform().
void _get_allocation_size | ( | dt_lib_histogram_t * | d, |
int * | width, | ||
int * | height | ||
) |
References height, dt_lib_histogram_t::scope_draw, and width.
Referenced by _redraw_surface(), and _trigger_recompute().
dt_backbuf_t * _get_backuf | ( | dt_develop_t * | dev, |
const char * | op | ||
) |
References dt_develop_t::display_histogram, dt_develop_t::output_histogram, and dt_develop_t::raw_histogram.
Referenced by _lib_histogram_preview_updated_callback(), _set_params(), and _stage_callback().
|
static |
|
static |
Referenced by _add_sample(), and gui_init().
|
static |
References _get_backuf(), _update_everything(), dt_lib_histogram_t::backbuf, darktable, dt_lib_module_t::data, darktable_t::develop, and dt_lib_histogram_t::op.
Referenced by view_enter(), and view_leave().
|
static |
References _set_sample_box_area(), _set_sample_point(), dt_colorpicker_sample_t::box, dt_lib_t::colorpicker, darktable, dt_control_queue_redraw_center(), DT_LIB_COLORPICKER_SIZE_BOX, DT_LIB_COLORPICKER_SIZE_POINT, FALSE, darktable_t::lib, dt_colorpicker_sample_t::locked, dt_lib_t::picker_proxy, dt_colorpicker_sample_t::point, dt_lib_t::proxy, and dt_colorpicker_sample_t::size.
Referenced by _add_sample().
|
static |
References HISTOGRAM_BINS.
Referenced by _bin_pixels_vectorscope_in_roi(), and _process_vectorscope().
|
static |
Referenced by _paint_parade().
gboolean _needs_recompute | ( | dt_lib_histogram_t * | d, |
const int | width, | ||
const int | height | ||
) |
References dt_lib_histogram_t::backbuf, dt_lib_histogram_t::cache, dt_lib_histogram_t::cst, dt_lib_histogram_t::display, dt_bauhaus_combobox_get(), dt_backbuf_t::hash, dt_lib_histogram_cache_t::hash, height, dt_lib_histogram_cache_t::height, dt_lib_histogram_cache_t::view, view(), width, dt_lib_histogram_cache_t::width, dt_lib_histogram_cache_t::zoom, and dt_lib_histogram_t::zoom.
Referenced by _trigger_recompute().
|
static |
References _mask_waveform(), double(), dt_alloc_align, dt_free_align, height, TONES, and width.
Referenced by _process_waveform().
|
static |
References double(), height, TONES, and width.
Referenced by _process_waveform().
|
static |
References dt_lib_histogram_t::add_sample_button.
Referenced by gui_init().
|
static |
References _scope_pixel_to_display_rgb(), _scope_pixel_to_xyz(), dt_colorpicker_sample_t::box, dt_backbuf_t::buffer, dt_colorpicker_sample_t::display, DT_LIB_COLORPICKER_SIZE_BOX, DT_LIB_COLORPICKER_SIZE_POINT, DT_LIB_COLORPICKER_STATISTIC_MAX, DT_LIB_COLORPICKER_STATISTIC_MEAN, DT_LIB_COLORPICKER_STATISTIC_MIN, DT_LIB_COLORPICKER_STATISTIC_N, dt_XYZ_to_Lab(), for_each_channel, dt_backbuf_t::height, dt_colorpicker_sample_t::lab, MAX, MIN, dt_colorpicker_sample_t::point, dt_colorpicker_sample_t::scope, dt_colorpicker_sample_t::size, and dt_backbuf_t::width.
Referenced by _pixelpipe_pick_samples().
|
static |
|
static |
References _bin_pickers_histogram(), _bin_pixels_histogram_in_roi(), _find_max_histogram(), darktable_t::bauhaus, dt_backbuf_t::buffer, dt_lib_t::colorpicker, darktable, dt_conf_get_bool(), dt_draw_grid(), dt_draw_histogram_8(), FALSE, dt_bauhaus_t::graph_bg, dt_bauhaus_t::graph_colors, dt_bauhaus_t::graph_grid, height, dt_backbuf_t::height, HISTOGRAM_BINS, darktable_t::lib, dt_lib_t::live_samples, dt_lib_t::picker_proxy, dt_lib_t::primary_sample, dt_lib_t::proxy, set_color(), width, and dt_backbuf_t::width.
Referenced by _redraw_surface().
|
static |
References _bin_vectorscope(), _create_vectorscope_image(), _find_max_histogram(), _Luv_to_vectorscope_coord_zoom(), dt_backbuf_t::buffer, colors, darktable, darktable_t::develop, dt_alloc_align, dt_apply_transposed_color_matrix(), dt_free_align, dt_ioppr_rgb_matrix_to_xyz(), dt_Lch_to_Luv(), dt_Luv_to_Lch(), dt_Luv_to_xyY(), DT_PIXEL_APPLY_DPI, dt_xyY_to_Luv(), dt_xyY_to_XYZ(), dt_XYZ_to_xyY(), error(), height, dt_backbuf_t::height, HISTOGRAM_BINS, dt_iop_order_iccprofile_info_t::lut_in, dt_iop_order_iccprofile_info_t::lutsize, M_PI, M_PI_F, dt_iop_order_iccprofile_info_t::matrix_in_transposed, dt_iop_order_iccprofile_info_t::matrix_out_transposed, dt_iop_order_iccprofile_info_t::nonlinearlut, dt_dev_pixelpipe_t::output_profile_info, dt_develop_t::preview_pipe, width, and dt_backbuf_t::width.
Referenced by _redraw_surface().
|
static |
References _bin_pixels_waveform(), _create_waveform_image(), _find_max_histogram(), _paint_parade(), _paint_waveform(), dt_backbuf_t::buffer, dt_alloc_align, dt_draw_grid(), dt_free_align, error(), height, dt_backbuf_t::height, TONES, width, and dt_backbuf_t::width.
Referenced by _redraw_surface().
|
static |
References dt_lib_histogram_t::scope_draw.
Referenced by _area_scrolled_callback(), _display_callback(), and _update_everything().
gboolean _redraw_surface | ( | dt_lib_histogram_t * | d | ) |
References _get_allocation_size(), _process_histogram(), _process_vectorscope(), _process_waveform(), dt_lib_histogram_t::backbuf, dt_lib_histogram_t::cache, dt_lib_histogram_t::cst, dt_lib_histogram_t::display, dt_bauhaus_combobox_get(), dt_get_times(), DT_LIB_HISTOGRAM_SCOPE_HISTOGRAM, DT_LIB_HISTOGRAM_SCOPE_PARADE_HORIZONTAL, DT_LIB_HISTOGRAM_SCOPE_PARADE_VERTICAL, DT_LIB_HISTOGRAM_SCOPE_VECTORSCOPE, DT_LIB_HISTOGRAM_SCOPE_WAVEFORM_HORIZONTAL, DT_LIB_HISTOGRAM_SCOPE_WAVEFORM_VERTICAL, dt_show_times_f(), FALSE, dt_backbuf_t::hash, dt_lib_histogram_cache_t::hash, height, dt_lib_histogram_cache_t::height, dt_lib_histogram_t::scope_draw, TRUE, dt_lib_histogram_cache_t::view, width, dt_lib_histogram_cache_t::width, dt_lib_histogram_cache_t::zoom, and dt_lib_histogram_t::zoom.
Referenced by _area_scrolled_callback(), and _trigger_recompute().
|
static |
References dt_lib_t::colorpicker, dt_colorpicker_sample_t::container, darktable, darktable_t::lib, dt_lib_t::live_samples, and dt_lib_t::proxy.
Referenced by _remove_sample_cb(), gui_cleanup(), and gui_reset().
|
static |
References _remove_sample(), and dt_control_queue_redraw_center().
Referenced by _add_sample().
void _reset_cache | ( | dt_lib_histogram_t * | d | ) |
References dt_lib_histogram_t::cache, DT_LIB_HISTOGRAM_SCOPE_N, dt_lib_histogram_cache_t::hash, dt_lib_histogram_cache_t::height, dt_lib_histogram_cache_t::view, dt_lib_histogram_cache_t::width, and dt_lib_histogram_cache_t::zoom.
Referenced by _resize_callback(), gui_init(), gui_reset(), view_enter(), and view_leave().
|
static |
References _reset_cache(), and _trigger_recompute().
Referenced by gui_init().
|
static |
References _update_everything(), dt_lib_t::colorpicker, darktable, dt_conf_set_bool(), darktable_t::lib, dt_lib_t::proxy, and dt_lib_t::restrict_histogram.
Referenced by gui_init().
|
static |
References DT_PIXEL_APPLY_DPI, dtgtk_cairo_paint_lock(), FALSE, height, dt_colorpicker_sample_t::locked, set_color(), dt_colorpicker_sample_t::swatch, and width.
Referenced by _add_sample(), and gui_init().
|
static |
References dt_lib_t::colorpicker, darktable, dt_control_queue_redraw_center(), FALSE, darktable_t::lib, dt_lib_t::picker_proxy, dt_lib_t::proxy, and dt_lib_t::selected_sample.
Referenced by _add_sample(), and gui_init().
|
static |
References dt_lib_t::colorpicker, darktable, dt_control_queue_redraw_center(), FALSE, darktable_t::lib, dt_lib_t::proxy, and dt_lib_t::selected_sample.
Referenced by _add_sample(), and gui_init().
|
static |
References dt_colorpicker_sample_t::display, dt_gui_add_class(), dt_Lab_2_LCH(), DT_LIB_COLORPICKER_STATISTIC_MEAN, DT_LIB_COLORPICKER_STATISTIC_N, dt_lib_colorpicker_statistic_names, dt_colorpicker_sample_t::lab, dt_colorpicker_sample_t::label_rgb, Lch_to_color_name(), dt_colorpicker_sample_t::scope, tooltip, TRUE, and view().
Referenced by _add_sample(), and gui_init().
void _scope_pixel_to_display_rgb | ( | const dt_aligned_pixel_t | rgb_in, |
dt_aligned_pixel_t | rgb_out, | ||
dt_lib_histogram_t * | d | ||
) |
References _backbuf_op_to_int(), darktable, darktable_t::develop, dt_ioppr_rgb_matrix_to_xyz(), dt_dev_pixelpipe_t::input_profile_info, dt_iop_order_iccprofile_info_t::lut_in, dt_iop_order_iccprofile_info_t::lut_out, dt_iop_order_iccprofile_info_t::lutsize, dt_iop_order_iccprofile_info_t::matrix_in_transposed, dt_iop_order_iccprofile_info_t::matrix_out_transposed, dt_iop_order_iccprofile_info_t::nonlinearlut, dt_dev_pixelpipe_t::output_profile_info, and dt_develop_t::preview_pipe.
Referenced by _pixelpipe_pick_from_image().
void _scope_pixel_to_xyz | ( | const dt_aligned_pixel_t | rgb_in, |
dt_aligned_pixel_t | xyz_out, | ||
dt_lib_histogram_t * | d | ||
) |
References _backbuf_op_to_int(), darktable, darktable_t::develop, dt_ioppr_rgb_matrix_to_xyz(), dt_dev_pixelpipe_t::input_profile_info, dt_iop_order_iccprofile_info_t::lut_in, dt_iop_order_iccprofile_info_t::lutsize, dt_iop_order_iccprofile_info_t::matrix_in_transposed, dt_iop_order_iccprofile_info_t::nonlinearlut, dt_dev_pixelpipe_t::output_profile_info, and dt_develop_t::preview_pipe.
Referenced by _bin_pixels_vectorscope_in_roi(), and _pixelpipe_pick_from_image().
void _set_params | ( | dt_lib_histogram_t * | d | ) |
References _backbuf_op_to_int(), _get_backuf(), dt_lib_histogram_t::backbuf, darktable, darktable_t::develop, dt_lib_histogram_t::display, dt_bauhaus_combobox_entry_set_sensitive(), dt_bauhaus_combobox_set(), dt_conf_get_float(), dt_conf_get_int(), dt_conf_get_string_const(), dt_image_is_raw(), DT_LIB_HISTOGRAM_SCOPE_VECTORSCOPE, dt_develop_t::image_storage, dt_lib_histogram_t::op, dt_lib_histogram_t::stage, and dt_lib_histogram_t::zoom.
Referenced by gui_init(), and gui_reset().
|
static |
References _update_everything(), _update_size(), dt_colorpicker_sample_t::box, dt_lib_module_t::data, DT_LIB_COLORPICKER_SIZE_BOX, and dt_lib_histogram_t::primary_sample.
Referenced by _live_sample_button(), and gui_init().
|
static |
References _update_everything(), _update_size(), dt_lib_module_t::data, DT_LIB_COLORPICKER_SIZE_POINT, dt_colorpicker_sample_t::point, and dt_lib_histogram_t::primary_sample.
Referenced by _live_sample_button(), and gui_init().
void _stage_callback | ( | GtkWidget * | widget, |
dt_lib_module_t * | self | ||
) |
References _backbuf_int_to_op(), _get_backuf(), _update_everything(), dt_lib_histogram_t::backbuf, darktable, dt_lib_module_t::data, darktable_t::develop, dt_lib_histogram_t::display, dt_bauhaus_combobox_entry_set_sensitive(), dt_bauhaus_combobox_get(), dt_conf_set_string(), DT_LIB_HISTOGRAM_SCOPE_VECTORSCOPE, and dt_lib_histogram_t::op.
Referenced by gui_init().
|
static |
gboolean _trigger_recompute | ( | dt_lib_histogram_t * | d | ) |
References _destroy_surface(), _get_allocation_size(), _is_backbuf_ready(), _needs_recompute(), _redraw_surface(), dt_lib_histogram_t::cst, dt_cairo_image_surface_create(), height, and width.
Referenced by _display_callback(), _resize_callback(), _update_everything(), and gui_reset().
|
static |
References _pixelpipe_pick_samples(), _redraw_scopes(), _trigger_recompute(), _update_sample_label(), dt_lib_histogram_t::add_sample_button, dt_lib_t::colorpicker, darktable, dt_lib_module_t::data, darktable_t::lib, dt_lib_t::live_samples, dt_lib_t::picker_proxy, dt_lib_histogram_t::primary_sample, and dt_lib_t::proxy.
Referenced by _add_sample(), _color_mode_changed(), _display_samples_changed(), _lib_histogram_preview_updated_callback(), _restrict_histogram_changed(), _set_sample_box_area(), _set_sample_point(), _stage_callback(), _statistic_changed(), _update_picker_output(), and _update_samples_output().
|
static |
References _update_everything().
Referenced by _update_size(), gui_init(), and gui_reset().
|
static |
References dt_colorpicker_sample_t::color_patch, dt_lib_module_t::data, dt_colorpicker_sample_t::display, dt_Lab_2_LCH(), DT_LIB_COLORPICKER_MODEL_HSL, DT_LIB_COLORPICKER_MODEL_HSV, DT_LIB_COLORPICKER_MODEL_LAB, DT_LIB_COLORPICKER_MODEL_LCH, DT_LIB_COLORPICKER_MODEL_NONE, DT_LIB_COLORPICKER_MODEL_RGB, DT_LIB_COLORPICKER_STATISTIC_MEAN, dt_RGB_2_HSL(), dt_RGB_2_HSV(), for_each_channel, dt_colorpicker_sample_t::lab, dt_colorpicker_sample_t::label_rgb, dt_lib_histogram_t::model, dt_colorpicker_sample_t::output_label, dt_colorpicker_sample_t::scope, dt_lib_histogram_t::statistic, and dt_colorpicker_sample_t::swatch.
Referenced by _update_everything().
|
static |
References _update_everything().
Referenced by gui_init().
|
static |
References _update_picker_output(), dt_lib_module_t::data, dt_lib_histogram_t::primary_sample, size, and dt_colorpicker_sample_t::size.
Referenced by _set_sample_box_area(), and _set_sample_point().
|
static |
References HISTOGRAM_BINS.
Referenced by _create_vectorscope_image().
uint32_t container | ( | dt_lib_module_t * | self | ) |
References DT_UI_CONTAINER_PANEL_LEFT_CENTER.
Referenced by _add_sample().
int expandable | ( | dt_lib_module_t * | self | ) |
void gui_cleanup | ( | dt_lib_module_t * | self | ) |
References _destroy_surface(), _remove_sample(), dt_lib_t::colorpicker, darktable, dt_lib_module_t::data, dt_free_align, dt_iop_color_picker_reset(), FALSE, darktable_t::lib, dt_lib_t::live_samples, dt_lib_t::primary_sample, dt_lib_t::proxy, dt_lib_t::set_sample_box_area, dt_lib_t::set_sample_point, dt_lib_t::update_panel, and dt_lib_t::update_samples.
void gui_init | ( | dt_lib_module_t * | self | ) |
References _add_sample(), _area_scrolled_callback(), _color_mode_changed(), _display_callback(), _display_samples_changed(), _draw_callback(), _label_size_allocate_callback(), _picker_button_toggled(), _reset_cache(), _resize_callback(), _restrict_histogram_changed(), _sample_draw_callback(), _sample_enter_callback(), _sample_leave_callback(), _sample_tooltip_callback(), _set_params(), _set_sample_box_area(), _set_sample_point(), _stage_callback(), _statistic_changed(), _update_picker_output(), _update_samples_output(), dt_lib_histogram_t::add_sample_button, darktable_t::bauhaus, dt_lib_histogram_t::color_mode_selector, dt_colorpicker_sample_t::color_patch, dt_lib_t::colorpicker, dt_lib_histogram_t::cst, darktable, dt_lib_module_t::data, dt_lib_histogram_t::display, dt_lib_t::display_samples, dt_lib_histogram_t::display_samples_check_box, dt_bauhaus_combobox_add(), dt_bauhaus_combobox_new(), dt_bauhaus_combobox_new_full(), dt_bauhaus_combobox_set_entries_ellipsis(), dt_bauhaus_widget_set_label(), dt_calloc_align(), dt_color_picker_new(), DT_COLOR_PICKER_POINT_AREA, dt_conf_get_bool(), dt_conf_get_string_const(), dt_gui_add_class(), DT_GUI_MODULE, dt_lib_colorpicker_model_names, dt_lib_colorpicker_statistic_names, DT_PIXEL_APPLY_DPI, dt_ui_scroll_wrap(), dt_ui_section_label_new(), dtgtk_button_new(), dtgtk_cairo_paint_square_plus(), dtgtk_drawing_area_new_with_aspect_ratio(), FALSE, darktable_t::gui, darktable_t::lib, dt_lib_t::live_samples, dt_lib_histogram_t::model, dt_colorpicker_sample_t::output_label, dt_lib_histogram_t::picker_button, dt_lib_t::picker_proxy, dt_lib_histogram_t::primary_sample, dt_lib_t::primary_sample, dt_lib_t::proxy, dt_lib_t::restrict_histogram, dt_lib_histogram_t::samples_container, dt_lib_histogram_t::scope_draw, dt_gui_gtk_t::scroll_mask, dt_lib_t::set_sample_box_area, dt_lib_t::set_sample_point, dt_lib_histogram_t::stage, dt_lib_histogram_t::statistic, dt_lib_histogram_t::statistic_selector, dt_colorpicker_sample_t::swatch, TRUE, dt_lib_t::update_panel, dt_lib_t::update_samples, and dt_lib_module_t::widget.
void gui_reset | ( | dt_lib_module_t * | self | ) |
References _destroy_surface(), _remove_sample(), _reset_cache(), _set_params(), _trigger_recompute(), _update_picker_output(), dt_lib_histogram_t::color_mode_selector, dt_lib_t::colorpicker, darktable, dt_lib_module_t::data, darktable_t::develop, dt_colorpicker_sample_t::display, dt_lib_histogram_t::display_samples_check_box, dt_bauhaus_combobox_set(), dt_dev_invalidate_preview, dt_dev_refresh_ui_images, dt_iop_color_picker_reset(), DT_LIB_COLORPICKER_STATISTIC_N, FALSE, dt_colorpicker_sample_t::lab, dt_colorpicker_sample_t::label_rgb, darktable_t::lib, dt_lib_t::live_samples, dt_lib_histogram_t::primary_sample, dt_lib_t::proxy, dt_colorpicker_sample_t::scope, dt_lib_histogram_t::statistic_selector, and dt_colorpicker_sample_t::swatch.
const char * name | ( | struct dt_lib_module_t * | self | ) |
int position | ( | ) |
void view_enter | ( | struct dt_lib_module_t * | self, |
struct dt_view_t * | old_view, | ||
struct dt_view_t * | new_view | ||
) |
void view_leave | ( | struct dt_lib_module_t * | self, |
struct dt_view_t * | old_view, | ||
struct dt_view_t * | new_view | ||
) |
const char ** views | ( | dt_lib_module_t * | self | ) |
const gchar* dt_lib_colorpicker_model_names[] = { N_("RGB"), N_("Lab"), N_("LCh"), N_("HSL"), N_("HSV"), N_("none"), NULL } |
Referenced by _color_mode_changed(), and gui_init().
const gchar* dt_lib_colorpicker_statistic_names[] = { N_("mean"), N_("min"), N_("max"), NULL } |
Referenced by _sample_tooltip_callback(), _statistic_changed(), and gui_init().