![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "common/curve_tools.h"
#include "common/darktable.h"
#include "common/splines.h"
#include "control/conf.h"
#include "develop/develop.h"
#include <cairo.h>
#include <glib.h>
#include <math.h>
#include <stdint.h>
#include <stdlib.h>
#include <gui/gtk.h>
Go to the source code of this file.
Data Structures | |
struct | dt_draw_curve_t |
Macros | |
#define | M_PI 3.141592654 |
Typedefs | |
typedef struct dt_draw_curve_t | dt_draw_curve_t |
Functions | |
static void | dt_draw_set_color_overlay (cairo_t *cr, gboolean bright, double alpha) |
static void | dt_draw_star (cairo_t *cr, float x, float y, float r1, float r2) |
static void | dt_draw_line (cairo_t *cr, float left, float top, float right, float bottom) |
static void | dt_draw_grid (cairo_t *cr, const int num, const int left, const int top, const int right, const int bottom) |
static float | dt_curve_to_mouse (const float x, const float zoom_factor, const float offset) |
static void | dt_draw_grid_zoomed (cairo_t *cr, const int num, const float left, const float top, const float right, const float bottom, const float width, const float height, const float zoom_factor, const float zoom_offset_x, const float zoom_offset_y) |
static float | dt_log_scale_axis (const float x, const float base) |
static void | dt_draw_loglog_grid (cairo_t *cr, const int num, const int left, const int top, const int right, const int bottom, const float base) |
static void | dt_draw_semilog_x_grid (cairo_t *cr, const int num, const int left, const int top, const int right, const int bottom, const float base) |
static void | dt_draw_semilog_y_grid (cairo_t *cr, const int num, const int left, const int top, const int right, const int bottom, const float base) |
static void | dt_draw_vertical_lines (cairo_t *cr, const int num, const int left, const int top, const int right, const int bottom) |
static void | dt_draw_horizontal_lines (cairo_t *cr, const int num, const int left, const int top, const int right, const int bottom) |
static dt_draw_curve_t * | dt_draw_curve_new (const float min, const float max, unsigned int type) |
static void | dt_draw_curve_destroy (dt_draw_curve_t *c) |
static void | dt_draw_curve_set_point (dt_draw_curve_t *c, const int num, const float x, const float y) |
static void | dt_draw_curve_smaple_values (dt_draw_curve_t *c, const float min, const float max, const int res, float *x, float *y) |
static void | dt_draw_curve_calc_values (dt_draw_curve_t *c, const float min, const float max, const int res, float *x, float *y) |
static void | dt_draw_curve_calc_values_V2_nonperiodic (dt_draw_curve_t *c, const float min, const float max, const int res, float *x, float *y) |
static void | dt_draw_curve_calc_values_V2_periodic (dt_draw_curve_t *c, const float min, const float max, const int res, float *x, float *y) |
static void | dt_draw_curve_calc_values_V2 (dt_draw_curve_t *c, const float min, const float max, const int res, float *x, float *y, const gboolean periodic) |
static float | dt_draw_curve_calc_value (dt_draw_curve_t *c, const float x) |
static int | dt_draw_curve_add_point (dt_draw_curve_t *c, const float x, const float y) |
static void | dt_draw_histogram_8_linxliny (cairo_t *cr, const uint32_t *hist, int32_t channels, int32_t channel) |
static void | dt_draw_histogram_8_zoomed (cairo_t *cr, const uint32_t *hist, int32_t channels, int32_t channel, const float zoom_factor, const float zoom_offset_x, const float zoom_offset_y, gboolean linear) |
static void | dt_draw_histogram_8_logxliny (cairo_t *cr, const uint32_t *hist, int32_t channels, int32_t channel, float base_log) |
static void | dt_draw_histogram_8_logxlogy (cairo_t *cr, const uint32_t *hist, int32_t channels, int32_t channel, float base_log) |
static void | dt_draw_histogram_8_linxlogy (cairo_t *cr, const uint32_t *hist, int32_t channels, int32_t channel) |
static void | dt_draw_histogram_8_log_base (cairo_t *cr, const uint32_t *hist, int32_t channels, int32_t channel, const gboolean linear, float base_log) |
static void | dt_draw_histogram_8 (cairo_t *cr, const uint32_t *hist, int32_t channels, int32_t channel, const gboolean linear) |
static void | dt_draw_cairo_to_gdk_pixbuf (uint8_t *data, unsigned int width, unsigned int height) |
static void | dt_cairo_perceptual_gradient (cairo_pattern_t *grad, double alpha) |
static GdkPixbuf * | dt_draw_paint_to_pixbuf (GtkWidget *widget, const guint pixbuf_size, const int flags, void(*dtgtk_cairo_paint_fct)(cairo_t *cr, gint x, gint y, gint w, gint h, gint flags, void *data)) |
#define M_PI 3.141592654 |
some common drawing routines.
typedef struct dt_draw_curve_t dt_draw_curve_t |
wrapper around nikon curve.
Referenced by _init_drawing(), and dt_iop_tonecurve_draw().
|
inlinestatic |
Referenced by dt_draw_grid_zoomed().
|
inlinestatic |
transform a data blob from cairo's premultiplied rgba/bgra to GdkPixbuf's un-premultiplied bgra/rgba
Referenced by _draw_ellipse(), _draw_rectangle(), _get_pixbuf_from_cairo(), _init_image_pin(), _init_place_pin(), _view_map_images_count(), dt_draw_paint_to_pixbuf(), and tree_insert_presets().
|
inlinestatic |
|
inlinestatic |
References interpolate_set(), interpolate_val(), MAX, and MIN.
Referenced by _area_button_press_callback(), _area_button_press_callback(), area_button_press(), denoiseprofile_button_press(), dt_iop_basecurve_button_press(), dt_iop_tonecurve_button_press(), get_scales(), lowlight_button_press(), process(), and rawdenoise_button_press().
|
inlinestatic |
References CurveDataSample(), and dt_draw_curve_smaple_values().
Referenced by _area_draw_callback(), _area_draw_callback(), _generate_curve_lut(), area_draw(), commit_params(), commit_params(), compute_curve_lut(), denoiseprofile_draw(), dt_iop_basecurve_draw(), dt_iop_tonecurve_draw(), lowlight_draw(), and rawdenoise_draw().
|
inlinestatic |
References dt_draw_curve_calc_values_V2_nonperiodic(), and dt_draw_curve_calc_values_V2_periodic().
Referenced by _area_draw_callback(), and commit_params().
|
inlinestatic |
References CurveDataSampleV2(), and dt_draw_curve_smaple_values().
Referenced by dt_draw_curve_calc_values_V2().
|
inlinestatic |
References CurveDataSampleV2Periodic(), and dt_draw_curve_smaple_values().
Referenced by dt_draw_curve_calc_values_V2().
|
inlinestatic |
|
inlinestatic |
References type.
Referenced by _area_draw_callback(), _area_draw_callback(), _generate_curve_lut(), commit_params(), compute_curve_lut(), dt_iop_basecurve_draw(), dt_iop_tonecurve_draw(), gui_init(), gui_init(), and init_pipe().
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
References dt_draw_line(), height, and width.
Referenced by _process_histogram(), _process_waveform(), area_draw(), area_draw(), denoiseprofile_draw(), dt_iop_basecurve_draw(), dt_iop_tonecurve_draw(), dt_iop_tonecurve_draw(), dt_iop_tonecurve_draw(), lowlight_draw(), and rawdenoise_draw().
|
inlinestatic |
References dt_curve_to_mouse(), dt_draw_line(), height, and width.
Referenced by _area_draw_callback().
|
inlinestatic |
References dt_draw_histogram_8_linxliny(), dt_draw_histogram_8_linxlogy(), and linear.
Referenced by _area_draw_callback(), _process_histogram(), dt_iop_levels_area_draw(), and dt_iop_tonecurve_draw().
|
inlinestatic |
Referenced by dt_draw_histogram_8().
|
inlinestatic |
Referenced by dt_draw_histogram_8().
|
inlinestatic |
References dt_draw_histogram_8_logxliny(), dt_draw_histogram_8_logxlogy(), and linear.
Referenced by dt_iop_tonecurve_draw().
|
inlinestatic |
Referenced by dt_draw_histogram_8_log_base().
|
inlinestatic |
Referenced by dt_draw_histogram_8_log_base().
|
inlinestatic |
References linear.
Referenced by _area_draw_callback(), and _area_draw_callback().
|
inlinestatic |
References height.
Referenced by dt_guides_draw_grid().
|
inlinestatic |
Referenced by _draw_line(), dt_draw_grid(), dt_draw_grid_zoomed(), dt_draw_loglog_grid(), dt_draw_semilog_x_grid(), dt_draw_semilog_y_grid(), dt_guides_draw_diagonal_method(), dt_guides_draw_golden_mean(), dt_guides_draw_harmonious_triangles(), dt_guides_draw_metering(), dt_guides_draw_perspective(), and dt_guides_draw_rules_of_thirds().
|
inlinestatic |
References dt_draw_line(), dt_log_scale_axis(), height, and width.
Referenced by dt_iop_basecurve_draw(), dt_iop_tonecurve_draw(), and dt_iop_tonecurve_draw().
|
inlinestatic |
References dt_draw_cairo_to_gdk_pixbuf(), DT_PIXEL_APPLY_DPI, flags, size, and TRUE.
Referenced by _gui_styles_dialog_run(), and dt_gui_hist_dialog_new().
|
inlinestatic |
References dt_draw_line(), dt_log_scale_axis(), height, and width.
Referenced by dt_iop_tonecurve_draw().
|
inlinestatic |
References dt_draw_line(), dt_log_scale_axis(), height, and width.
Referenced by dt_iop_tonecurve_draw().
set color based on gui overlay preference
References darktable, darktable_t::gui, dt_gui_gtk_t::overlay_blue, dt_gui_gtk_t::overlay_contrast, dt_gui_gtk_t::overlay_green, and dt_gui_gtk_t::overlay_red.
Referenced by _brush_events_post_expose(), _circle_draw_lines(), _circle_events_post_expose(), _draw_sym(), _ellipse_draw_border(), _ellipse_draw_shape(), _ellipse_events_post_expose(), _gradient_draw_arrow(), _gradient_draw_lines(), _path_events_post_expose(), dt_guides_draw(), dt_guides_draw_grid(), gui_draw_sym(), gui_post_expose(), and gui_post_expose().
|
inlinestatic |
draws a rating star
References M_PI.
Referenced by dtgtk_cairo_paint_overlays(), dtgtk_cairo_paint_star(), and dtgtk_cairo_paint_unratestar().
|
inlinestatic |
References width.
Referenced by _area_draw_callback(), dt_guides_draw_grid(), and dt_iop_levels_area_draw().
|
inlinestatic |
Referenced by dt_draw_loglog_grid(), dt_draw_semilog_x_grid(), dt_draw_semilog_y_grid(), and dt_iop_tonecurve_draw().