64#define M_PI 3.141592654
69#define DT_DRAW_SIZE_GLOBAL_FACTOR 0.75f
72#define DT_DRAW_SIZE_LINE DT_PIXEL_APPLY_DPI_DPP(1.5f * DT_DRAW_SIZE_GLOBAL_FACTOR)
73#define DT_DRAW_SIZE_LINE_SELECTED DT_PIXEL_APPLY_DPI_DPP(3.0f * DT_DRAW_SIZE_GLOBAL_FACTOR)
74#define DT_DRAW_SIZE_LINE_HIGHLIGHT (DT_PIXEL_APPLY_DPI_DPP(4.0f * DT_DRAW_SIZE_GLOBAL_FACTOR) + DT_DRAW_SIZE_LINE)
75#define DT_DRAW_SIZE_LINE_HIGHLIGHT_SELECTED (DT_PIXEL_APPLY_DPI_DPP(5.0f * DT_DRAW_SIZE_GLOBAL_FACTOR) + DT_DRAW_SIZE_LINE_SELECTED)
76#define DT_DRAW_SIZE_CROSS DT_PIXEL_APPLY_DPI_DPP(7.0f * DT_DRAW_SIZE_GLOBAL_FACTOR)
79#define DT_DRAW_SCALE_DASH DT_PIXEL_APPLY_DPI_DPP(12.0f * DT_DRAW_SIZE_GLOBAL_FACTOR)
80#define DT_DRAW_SCALE_ARROW DT_PIXEL_APPLY_DPI_DPP(18.0f * DT_DRAW_SIZE_GLOBAL_FACTOR)
83#define DT_DRAW_RADIUS_NODE DT_PIXEL_APPLY_DPI_DPP(5.0f * DT_DRAW_SIZE_GLOBAL_FACTOR)
84#define DT_DRAW_RADIUS_NODE_SELECTED (1.25f * DT_DRAW_RADIUS_NODE)
87#define DT_DRAW_SELECTION_ROTATION_AREA DT_PIXEL_APPLY_DPI_DPP(50.0f)
88#define DT_DRAW_SELECTION_ROTATION_RADIUS(dev) (DT_DRAW_SELECTION_ROTATION_AREA / dt_dev_get_zoom_level((dt_develop_t *)dev))
120static inline void dt_draw_star(cairo_t *cr,
float x,
float y,
float r1,
float r2)
122 const float d = 2.0 *
M_PI * 0.1f;
123 const float dx[10] = { sinf(0.0), sinf(
d), sinf(2 *
d), sinf(3 *
d), sinf(4 *
d),
124 sinf(5 *
d), sinf(6 *
d), sinf(7 *
d), sinf(8 *
d), sinf(9 *
d) };
125 const float dy[10] = { cosf(0.0), cosf(
d), cosf(2 *
d), cosf(3 *
d), cosf(4 *
d),
126 cosf(5 *
d), cosf(6 *
d), cosf(7 *
d), cosf(8 *
d), cosf(9 *
d) };
128 cairo_move_to(cr,
x + r1 * dx[0], y - r1 * dy[0]);
129 for(
int k = 1;
k < 10;
k++)
131 cairo_line_to(cr,
x + r2 * dx[
k], y - r2 * dy[
k]);
133 cairo_line_to(cr,
x + r1 * dx[
k], y - r1 * dy[
k]);
134 cairo_close_path(cr);
137static inline void dt_draw_line(cairo_t *cr,
float left,
float top,
float right,
float bottom)
139 cairo_move_to(cr, left,
top);
140 cairo_line_to(cr, right, bottom);
143static inline void dt_draw_grid(cairo_t *cr,
const int num,
const int left,
const int top,
const int right,
146 float width = right - left;
149 for(
int k = 1;
k < num;
k++)
160 return (
x - offset) * zoom_factor;
165 const float right,
const float bottom,
const float width,
166 const float height,
const float zoom_factor,
const float zoom_offset_x,
167 const float zoom_offset_y)
169 for(
int k = 1;
k < num;
k++)
188 return logf(
x * (base - 1.0f) + 1.f) / logf(base);
192 const int bottom,
const float base)
194 float width = right - left;
197 for(
int k = 1;
k < num;
k++)
208 const int right,
const int bottom,
const float base)
210 float width = right - left;
213 for(
int k = 1;
k < num;
k++)
224 const int right,
const int bottom,
const float base)
226 float width = right - left;
229 for(
int k = 1;
k < num;
k++)
241 const int right,
const int bottom)
243 float width = right - left;
245 for(
int k = 1;
k < num;
k++)
247 cairo_move_to(cr, left +
k / (
float)num *
width,
top);
248 cairo_line_to(cr, left +
k / (
float)num *
width, bottom);
254 const int right,
const int bottom)
258 for(
int k = 1;
k < num;
k++)
260 cairo_move_to(cr, left,
top +
k / (
float)num *
height);
261 cairo_line_to(cr, right,
top +
k / (
float)num *
height);
269 c->csample.m_samplingRes = 0x10000;
270 c->csample.m_outputRes = 0x10000;
271 c->csample.m_Samples = (uint16_t *)malloc(
sizeof(uint16_t) * 0x10000);
273 c->c.m_spline_type =
type;
274 c->c.m_numAnchors = 0;
290 c->c.m_anchors[num].x =
x;
291 c->c.m_anchors[num].y = y;
300 for(
int k = 0;
k < res;
k++)
x[
k] =
k * (1.0f / res);
305 for(
int k = 0;
k < res;
k++) y[
k] =
min + (
max -
min) * c->csample.m_Samples[
k] * (1.0f / 0x10000);
312 c->csample.m_samplingRes = res;
313 c->csample.m_outputRes = 0x10000;
319 const int res,
float *
x,
float *y)
321 c->csample.m_samplingRes = res;
322 c->csample.m_outputRes = 0x10000;
328 const int res,
float *
x,
float *y)
330 c->csample.m_samplingRes = res;
331 c->csample.m_outputRes = 0x10000;
337 const int res,
float *
x,
float *y,
const gboolean periodic)
347 float xa[20], ya[20];
350 for(
int i = 0;
i < c->c.m_numAnchors;
i++)
352 xa[
i] = c->c.m_anchors[
i].x;
353 ya[
i] = c->c.m_anchors[
i].y;
358 val =
interpolate_val(c->c.m_numAnchors, xa,
x, ya, ypp, c->c.m_spline_type);
361 return MIN(
MAX(val, c->c.m_min_y), c->c.m_max_y);
366 c->c.m_anchors[c->c.m_numAnchors].x =
x;
367 c->c.m_anchors[c->c.m_numAnchors].y = y;
376 cairo_move_to(cr, 0, 0);
377 for(
int k = 0;
k < 256;
k++) cairo_line_to(cr,
k, hist[channels *
k + channel]);
378 cairo_line_to(cr, 255, 0);
379 cairo_close_path(cr);
384 const float zoom_factor,
const float zoom_offset_x,
385 const float zoom_offset_y, gboolean
linear)
387 cairo_move_to(cr, -zoom_offset_x, -zoom_offset_y);
388 for(
int k = 0;
k < 256;
k++)
390 const float value = ((float)hist[channels *
k + channel] - zoom_offset_y) * zoom_factor;
391 const float hist_value =
value < 0 ? 0.f :
value;
392 cairo_line_to(cr, ((
float)
k - zoom_offset_x) * zoom_factor,
linear ? hist_value : logf(1.0f + hist_value));
394 cairo_line_to(cr, (255.f - zoom_offset_x), -zoom_offset_y * zoom_factor);
395 cairo_close_path(cr);
401 int32_t channel,
float base_log)
403 cairo_move_to(cr, 0, 0);
404 for(
int k = 0;
k < 256;
k++)
406 const float x = logf((
float)
k / 255.0f * (base_log - 1.0f) + 1.0f) / logf(base_log) * 255.0f;
407 const float y = hist[channels *
k + channel];
408 cairo_line_to(cr,
x, y);
410 cairo_line_to(cr, 255, 0);
411 cairo_close_path(cr);
417 int32_t channel,
float base_log)
419 cairo_move_to(cr, 0, 0);
420 for(
int k = 0;
k < 256;
k++)
422 const float x = logf((
float)
k / 255.0f * (base_log - 1.0f) + 1.0f) / logf(base_log) * 255.0f;
423 const float y = logf(1.0 + hist[channels *
k + channel]);
424 cairo_line_to(cr,
x, y);
426 cairo_line_to(cr, 255, 0);
427 cairo_close_path(cr);
435 cairo_move_to(cr, 0, 0);
436 for(
int k = 0;
k < 256;
k++) cairo_line_to(cr,
k, logf(1.0 + hist[channels *
k + channel]));
437 cairo_line_to(cr, 255, 0);
438 cairo_close_path(cr);
444 int32_t channel,
const gboolean
linear,
float base_log)
454static inline void dt_draw_histogram_8(cairo_t *cr,
const uint32_t *hist, int32_t channels, int32_t channel,
466 for(uint32_t y = 0; y <
height; y++)
469 uint8_t *
r, *
g, *b, *a, tmp;
470 r = &data[(y *
width +
x) * 4 + 0];
471 g = &data[(y *
width +
x) * 4 + 1];
472 b = &data[(y *
width +
x) * 4 + 2];
473 a = &data[(y *
width +
x) * 4 + 3];
483 float inv_a = 255.0 / *a;
494 cairo_pattern_add_color_stop_rgba(grad, 0.0, 0.0, 0.0, 0.0, alpha);
495 cairo_pattern_add_color_stop_rgba(grad, 1.0, 1.0, 1.0, 1.0, alpha);
500 void (*dtgtk_cairo_paint_fct)(cairo_t *cr, gint
x, gint y, gint w, gint h, gint
flags,
void *data))
503 GtkStyleContext *context = gtk_widget_get_style_context(widget);
504 GtkStateFlags
state = gtk_widget_get_state_flags(widget);
505 gtk_style_context_get_color(context,
state, &fg_color);
508 cairo_surface_t *cst = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, dim, dim);
509 cairo_t *cr = cairo_create(cst);
510 gdk_cairo_set_source_rgba(cr, &fg_color);
511 (*dtgtk_cairo_paint_fct)(cr, 0, 0, dim, dim,
flags, NULL);
513 uint8_t *data = cairo_image_surface_get_data(cst);
515 const size_t size = (size_t)dim * dim * 4;
516 uint8_t *buf = (uint8_t *)malloc(
size);
517 memcpy(buf, data,
size);
518 GdkPixbuf *pixbuf = gdk_pixbuf_new_from_data(buf, GDK_COLORSPACE_RGB,
TRUE, 8, dim, dim, dim * 4,
519 (GdkPixbufDestroyNotify)free, NULL);
520 cairo_surface_destroy(cst);
531 cairo_set_operator(cr, CAIRO_OPERATOR_CLEAR);
533 cairo_fill_preserve(cr);
536 cairo_set_operator(cr, CAIRO_OPERATOR_OVER);
554 cairo_set_dash(cr, NULL, 0, 0);
578 cairo_set_dash(cr, NULL, 0, 0);
582 const int pattern_len = 2;
583 cairo_set_dash(cr, pattern, pattern_len, 0);
597static inline void dt_draw_node(cairo_t *cr,
const gboolean square,
const gboolean point_action,
const gboolean selected,
const float zoom_scale,
const float x,
const float y)
605 const float pos = node_width * 0.7071f;
606 cairo_rectangle(cr,
x - pos, y - pos, node_width * 2.f, node_width * 2.f);
609 cairo_arc(cr,
x, y, node_width * 1.2f, 0.0, 2.0 *
M_PI);
617 cairo_set_line_width(cr, line_width);
619 cairo_fill_preserve(cr);
622 cairo_set_line_width(cr, (selected && !point_action) ? line_width * 2. : line_width);
629 cairo_arc(cr,
x, y, debug_radius, 0.0, 2.0 *
M_PI);
630 cairo_set_line_width(cr, line_width);
631 cairo_set_source_rgba(cr, 0.0, 1.0, 0.0, 1.0);
648static inline void dt_draw_handle(cairo_t *cr,
const float pt[2],
const float zoom_scale,
649 const float handle[2],
const gboolean selected,
const gboolean square)
660 float delta_x = handle[0] - pt[0];
661 float delta_y = handle[1] - pt[1];
662 float start_x = pt[0] + delta_x;
663 float start_y = pt[1] + delta_y;
664 float end_x = handle[0] - delta_x;
665 float end_y = handle[1] - delta_y;
666 cairo_move_to(cr, start_x, start_y);
667 cairo_line_to(cr, end_x, end_y);
671 cairo_stroke_preserve(cr);
683 const float square_width = handle_radius * 0.7071f;
684 cairo_rectangle(cr, handle[0] - square_width, handle[1] - square_width, square_width * 2.f, square_width * 2.f);
687 cairo_arc(cr, handle[0], handle[1], handle_radius, 0, 2.0 *
M_PI);
689 const float line_width_dark = selected
692 const float line_width_bright = selected
697 cairo_set_line_width(cr, line_width_dark * 1.125);
699 cairo_stroke_preserve(cr);
701 cairo_set_line_width(cr, line_width_bright * 1.5);
703 cairo_stroke_preserve(cr);
719typedef void (*
shape_draw_function_t)(cairo_t *cr,
const float *points,
const int points_count,
const int nb,
const gboolean border,
const gboolean source);
735 const float zoom_scale,
const float *points,
const int points_count,
const shape_draw_function_t *draw_shape_func,
const cairo_line_cap_t line_cap)
739 cairo_set_line_cap(cr, line_cap);
744 if(points && points_count >= 2 && draw_shape_func)
745 (*draw_shape_func)(cr, points, points_count, nb, border,
FALSE);
752 const float line_width_dark = selected
755 const float line_width_bright = selected
760 cairo_set_line_width(cr, line_width_dark);
762 cairo_stroke_preserve(cr);
765 cairo_set_line_width(cr, line_width_bright);
782 const gboolean selected,
const float zoom_scale,
const cairo_line_cap_t line_cap)
784 dt_draw_shape_lines(dash_type, source, cr, 0, selected, zoom_scale, NULL, 0, NULL, line_cap);
787static void _draw_arrow_head(cairo_t *cr,
const float arrow[2],
const float arrow_x_a,
const float arrow_y_a,
788 const float arrow_x_b,
const float arrow_y_b)
791 cairo_move_to(cr, arrow_x_a, arrow_y_a);
792 cairo_line_to(cr, arrow[0], arrow[1]);
793 cairo_line_to(cr, arrow_x_b, arrow_y_b);
795 cairo_close_path(cr);
799 const float tail[2],
const gboolean draw_tail)
801 if(draw_tail)
dt_draw_line(cr, arrow_bud_x, arrow_bud_y, tail[0], tail[1]);
817static inline void dt_draw_arrow(cairo_t *cr,
const float zoom_scale,
const gboolean selected,
const gboolean draw_tail,
818 const dt_draw_dash_type_t dash_style,
const float arrow[2],
const float tail[2],
const float angle)
821 const float arrow_x_a = arrow[0] + (
DT_DRAW_SCALE_ARROW / zoom_scale) * cosf(angle + (0.4f));
822 const float arrow_y_a = arrow[1] + (
DT_DRAW_SCALE_ARROW / zoom_scale) * sinf(angle + (0.4f));
823 const float arrow_x_b = arrow[0] + (
DT_DRAW_SCALE_ARROW / zoom_scale) * cosf(angle - (0.4f));
824 const float arrow_y_b = arrow[1] + (
DT_DRAW_SCALE_ARROW / zoom_scale) * sinf(angle - (0.4f));
826 const float arrow_bud_x = (arrow_x_a + arrow_x_b) * 0.5f;
827 const float arrow_bud_y = (arrow_y_a + arrow_y_b) * 0.5f;
830 cairo_set_line_cap(cr, CAIRO_LINE_CAP_ROUND);
866 cairo_set_source_rgba(cr, 0., 0., 0., 0.);
867 cairo_fill_preserve(cr);
890static inline void dt_draw_cross(cairo_t *cr,
const float zoom_scale,
const float x,
const float y)
896 cairo_set_line_cap(cr, CAIRO_LINE_CAP_SQUARE);
901 cairo_move_to(cr,
x + dx, y);
902 cairo_line_to(cr,
x - dx, y);
903 cairo_move_to(cr,
x, y + dy);
904 cairo_line_to(cr,
x, y - dy);
905 cairo_stroke_preserve(cr);
915 const float *source_pts,
const int source_pts_count,
const int nodes_nb,
const shape_draw_function_t *draw_shape_func)
919 cairo_set_line_cap(cr, CAIRO_LINE_CAP_ROUND);
923 (*draw_shape_func)(cr, source_pts, source_pts_count, nodes_nb,
FALSE,
TRUE);
931 cairo_stroke_preserve(cr);
946 cairo_surface_t *cst = cairo_image_surface_create(CAIRO_FORMAT_ARGB32,
width,
height);
947 cairo_t *cr = cairo_create(cst);
951 guchar *data = cairo_image_surface_get_data(cst);
953 return gdk_pixbuf_new_from_data(data, GDK_COLORSPACE_RGB,
TRUE, 8,
width,
height,
954 cairo_image_surface_get_stride(cst), NULL, NULL);
#define TRUE
Definition ashift_lsd.c:162
#define FALSE
Definition ashift_lsd.c:158
int width
Definition bilateral.h:1
int height
Definition bilateral.h:1
const float i
Definition colorspaces_inline_conversions.h:440
const float g
Definition colorspaces_inline_conversions.h:674
const float d
Definition colorspaces_inline_conversions.h:680
static const float const float const float min
Definition colorspaces_inline_conversions.h:438
const float max
Definition colorspaces_inline_conversions.h:490
const float top
Definition colorspaces_inline_conversions.h:443
typedef void((*dt_cache_allocate_t)(void *userdata, dt_cache_entry_t *entry))
darktable_t darktable
Definition darktable.c:173
@ DT_DEBUG_MASKS
Definition darktable.h:726
#define dt_free(ptr)
Definition darktable.h:456
#define __OMP_DECLARE_SIMD__(...)
Definition darktable.h:263
static const dt_aligned_pixel_simd_t value
Definition darktable.h:577
#define __OMP_PARALLEL_FOR_SIMD__(...)
Definition darktable.h:259
static float dt_curve_to_mouse(const float x, const float zoom_factor, const float offset)
Definition draw.h:158
#define DT_DRAW_SCALE_DASH
Definition draw.h:79
#define DT_DRAW_SIZE_LINE
Definition draw.h:72
static void _draw_fill_clear(cairo_t *cr, gboolean preserve)
Definition draw.h:529
#define DT_DRAW_RADIUS_NODE_SELECTED
Definition draw.h:84
static void dt_draw_set_dash_style(cairo_t *cr, dt_draw_dash_type_t type, float zoom_scale)
Definition draw.h:549
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))
Definition draw.h:499
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)
Definition draw.h:309
static void dt_draw_stroke_line(const dt_draw_dash_type_t dash_type, const gboolean source, cairo_t *cr, const gboolean selected, const float zoom_scale, const cairo_line_cap_t line_cap)
Stroke a line with style.
Definition draw.h:781
static void dt_draw_horizontal_lines(cairo_t *cr, const int num, const int left, const int top, const int right, const int bottom)
Definition draw.h:253
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)
Definition draw.h:383
static void dt_draw_handle(cairo_t *cr, const float pt[2], const float zoom_scale, const float handle[2], const gboolean selected, const gboolean square)
Draw a control handle attached to a point with a tail between the node and the handle.
Definition draw.h:648
#define DT_DRAW_SIZE_LINE_HIGHLIGHT
Definition draw.h:74
static void dt_draw_cross(cairo_t *cr, const float zoom_scale, const float x, const float y)
Definition draw.h:890
#define DT_DRAW_SIZE_LINE_SELECTED
Definition draw.h:73
static void dt_draw_histogram_8_logxlogy(cairo_t *cr, const uint32_t *hist, int32_t channels, int32_t channel, float base_log)
Definition draw.h:416
static void dt_draw_cairo_to_gdk_pixbuf(uint8_t *data, unsigned int width, unsigned int height)
Definition draw.h:464
static void dt_draw_histogram_8_linxlogy(cairo_t *cr, const uint32_t *hist, int32_t channels, int32_t channel)
Definition draw.h:432
static float dt_log_scale_axis(const float x, const float base)
Definition draw.h:186
static void _fill_clear_preserve(cairo_t *cr)
Definition draw.h:544
static void dt_draw_set_color_overlay(cairo_t *cr, gboolean bright, double alpha)
Definition draw.h:106
static void dt_draw_line(cairo_t *cr, float left, float top, float right, float bottom)
Definition draw.h:137
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)
Definition draw.h:294
static void dt_draw_histogram_8_linxliny(cairo_t *cr, const uint32_t *hist, int32_t channels, int32_t channel)
Definition draw.h:373
static void dt_draw_vertical_lines(cairo_t *cr, const int num, const int left, const int top, const int right, const int bottom)
Definition draw.h:240
static void dt_draw_grid(cairo_t *cr, const int num, const int left, const int top, const int right, const int bottom)
Definition draw.h:143
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)
Definition draw.h:223
static float dt_draw_curve_calc_value(dt_draw_curve_t *c, const float x)
Definition draw.h:345
static void dt_cairo_perceptual_gradient(cairo_pattern_t *grad, double alpha)
Definition draw.h:491
dt_draw_dash_type_t
Definition draw.h:92
@ DT_MASKS_DASH_STICK
Definition draw.h:94
@ DT_MASKS_DASH_ROUND
Definition draw.h:95
@ DT_MASKS_NO_DASH
Definition draw.h:93
static void dt_draw_star(cairo_t *cr, float x, float y, float r1, float r2)
Definition draw.h:120
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)
Definition draw.h:318
#define DT_DRAW_SCALE_ARROW
Definition draw.h:80
static void dt_draw_curve_destroy(dt_draw_curve_t *c)
Definition draw.h:282
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)
Definition draw.h:336
#define DT_DRAW_SIZE_CROSS
Definition draw.h:76
static void dt_draw_shape_lines(const dt_draw_dash_type_t dash_type, const gboolean source, cairo_t *cr, const int nb, const gboolean selected, const float zoom_scale, const float *points, const int points_count, const shape_draw_function_t *draw_shape_func, const cairo_line_cap_t line_cap)
Draw the lines of a mask shape.
Definition draw.h:734
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)
Definition draw.h:443
#define DT_DRAW_RADIUS_NODE
Definition draw.h:83
static void dt_draw_curve_set_point(dt_draw_curve_t *c, const int num, const float x, const float y)
Definition draw.h:288
static void dt_draw_arrow(cairo_t *cr, const float zoom_scale, const gboolean selected, const gboolean draw_tail, const dt_draw_dash_type_t dash_style, const float arrow[2], const float tail[2], const float angle)
Draw an arrow with head and, if needed, tail. The length of the arrow head is defined by DT_DRAW_SCAL...
Definition draw.h:817
static int dt_draw_curve_add_point(dt_draw_curve_t *c, const float x, const float y)
Definition draw.h:364
static void dt_draw_histogram_8_logxliny(cairo_t *cr, const uint32_t *hist, int32_t channels, int32_t channel, float base_log)
Definition draw.h:400
static GdkPixbuf * dt_draw_get_pixbuf_from_cairo(DTGTKCairoPaintIconFunc paint, const int width, const int height)
Definition draw.h:944
static void _fill_clear(cairo_t *cr)
Definition draw.h:539
#define DT_DRAW_SIZE_LINE_HIGHLIGHT_SELECTED
Definition draw.h:75
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)
Definition draw.h:207
static void dt_draw_histogram_8(cairo_t *cr, const uint32_t *hist, int32_t channels, int32_t channel, const gboolean linear)
Definition draw.h:454
static dt_draw_curve_t * dt_draw_curve_new(const float min, const float max, unsigned int type)
Definition draw.h:266
#define M_PI
Definition draw.h:64
void(* shape_draw_function_t)(cairo_t *cr, const float *points, const int points_count, const int nb, const gboolean border, const gboolean source)
Definition draw.h:719
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)
Definition draw.h:191
static void _draw_arrow_head(cairo_t *cr, const float arrow[2], const float arrow_x_a, const float arrow_y_a, const float arrow_x_b, const float arrow_y_b)
Definition draw.h:787
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)
Definition draw.h:327
static void dt_draw_source_shape(cairo_t *cr, const float zoom_scale, const gboolean selected, const float *source_pts, const int source_pts_count, const int nodes_nb, const shape_draw_function_t *draw_shape_func)
Definition draw.h:914
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)
Definition draw.h:164
static void dt_draw_node(cairo_t *cr, const gboolean square, const gboolean point_action, const gboolean selected, const float zoom_scale, const float x, const float y)
Draw an node point of a mask.
Definition draw.h:597
static void _draw_arrow_tail(cairo_t *cr, const float arrow_bud_x, const float arrow_bud_y, const float tail[2], const gboolean draw_tail)
Definition draw.h:798
void(* DTGTKCairoPaintIconFunc)(cairo_t *cr, gint x, gint y, gint w, gint h, gint flags, void *data)
Definition dtgtk/paint.h:75
void dt_gui_gtk_set_source_rgba(cairo_t *cr, dt_gui_color_t color, float opacity_coef)
Definition gtk.c:369
@ DT_GUI_COLOR_BUTTON_FG
Definition gtk.h:107
#define DT_GUI_MOUSE_EFFECT_RADIUS_SCALED
Definition gtk.h:71
#define DT_PIXEL_APPLY_DPI(value)
Definition gtk.h:75
static const float x
Definition iop_profile.h:235
@ linear
Definition lightroom.c:368
float *const restrict const size_t k
Definition luminance_mask.h:78
size_t size
Definition mipmap_cache.c:3
dt_mipmap_buffer_dsc_flags flags
Definition mipmap_cache.c:4
struct _GtkWidget GtkWidget
Definition splash.h:29
int CurveDataSampleV2Periodic(CurveData *curve, CurveSample *sample)
Definition splines.cpp:848
int CurveDataSampleV2(CurveData *curve, CurveSample *sample)
Definition splines.cpp:752
const float uint32_t state[4]
Definition src/develop/noise_generator.h:72
const float r
Definition src/develop/noise_generator.h:101
Definition curve_tools.h:64
Definition curve_tools.h:84
struct dt_gui_gtk_t * gui
Definition darktable.h:774
int32_t unmuted
Definition darktable.h:759
CurveSample csample
Definition draw.h:102
CurveData c
Definition draw.h:101
double overlay_contrast
Definition gtk.h:160
double overlay_red
Definition gtk.h:160
double overlay_green
Definition gtk.h:160
double overlay_blue
Definition gtk.h:160
#define MIN(a, b)
Definition thinplate.c:32
#define MAX(a, b)
Definition thinplate.c:29