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++)
186#pragma omp declare simd uniform(base)
190 return logf(
x * (base - 1.0f) + 1.f) / logf(base);
194 const int bottom,
const float base)
196 float width = right - left;
199 for(
int k = 1; k < num; k++)
210 const int right,
const int bottom,
const float base)
212 float width = right - left;
215 for(
int k = 1; k < num; k++)
226 const int right,
const int bottom,
const float base)
228 float width = right - left;
231 for(
int k = 1; k < num; k++)
243 const int right,
const int bottom)
245 float width = right - left;
247 for(
int k = 1; k < num; k++)
249 cairo_move_to(cr, left + k / (
float)num *
width,
top);
250 cairo_line_to(cr, left + k / (
float)num *
width, bottom);
256 const int right,
const int bottom)
260 for(
int k = 1; k < num; k++)
262 cairo_move_to(cr, left,
top + k / (
float)num *
height);
263 cairo_line_to(cr, right,
top + k / (
float)num *
height);
272 c->csample.m_outputRes = 0x10000;
273 c->csample.m_Samples = (uint16_t *)malloc(
sizeof(uint16_t) * 0x10000);
275 c->c.m_spline_type =
type;
276 c->c.m_numAnchors = 0;
292 c->c.m_anchors[num].x =
x;
293 c->c.m_anchors[num].y = y;
302#pragma omp parallel for SIMD() default(none) dt_omp_firstprivate(res) shared(x) schedule(static)
304 for(
int k = 0; k < res; k++)
x[k] = k * (1.0f / res);
309#pragma omp parallel for SIMD() default(none) dt_omp_firstprivate(min, max, res) shared(y, c) schedule(static)
311 for(
int k = 0; k < res; k++) y[k] =
min + (
max -
min) *
c->csample.m_Samples[k] * (1.0f / 0x10000);
318 c->csample.m_samplingRes = res;
319 c->csample.m_outputRes = 0x10000;
325 const int res,
float *
x,
float *y)
327 c->csample.m_samplingRes = res;
328 c->csample.m_outputRes = 0x10000;
334 const int res,
float *
x,
float *y)
336 c->csample.m_samplingRes = res;
337 c->csample.m_outputRes = 0x10000;
343 const int res,
float *
x,
float *y,
const gboolean periodic)
353 float xa[20], ya[20];
356 for(
int i = 0;
i <
c->c.m_numAnchors;
i++)
358 xa[
i] =
c->c.m_anchors[
i].x;
359 ya[
i] =
c->c.m_anchors[
i].y;
367 return MIN(
MAX(val,
c->c.m_min_y),
c->c.m_max_y);
372 c->c.m_anchors[
c->c.m_numAnchors].x =
x;
373 c->c.m_anchors[
c->c.m_numAnchors].y = y;
382 cairo_move_to(cr, 0, 0);
383 for(
int k = 0; k < 256; k++) cairo_line_to(cr, k, hist[channels * k + channel]);
384 cairo_line_to(cr, 255, 0);
385 cairo_close_path(cr);
390 const float zoom_factor,
const float zoom_offset_x,
391 const float zoom_offset_y, gboolean
linear)
393 cairo_move_to(cr, -zoom_offset_x, -zoom_offset_y);
394 for(
int k = 0; k < 256; k++)
396 const float value = ((float)hist[channels * k + channel] - zoom_offset_y) * zoom_factor;
397 const float hist_value =
value < 0 ? 0.f :
value;
398 cairo_line_to(cr, ((
float)k - zoom_offset_x) * zoom_factor,
linear ? hist_value : logf(1.0f + hist_value));
400 cairo_line_to(cr, (255.f - zoom_offset_x), -zoom_offset_y * zoom_factor);
401 cairo_close_path(cr);
407 int32_t channel,
float base_log)
409 cairo_move_to(cr, 0, 0);
410 for(
int k = 0; k < 256; k++)
412 const float x = logf((
float)k / 255.0f * (base_log - 1.0f) + 1.0f) / logf(base_log) * 255.0f;
413 const float y = hist[channels * k + channel];
414 cairo_line_to(cr,
x, y);
416 cairo_line_to(cr, 255, 0);
417 cairo_close_path(cr);
423 int32_t channel,
float base_log)
425 cairo_move_to(cr, 0, 0);
426 for(
int k = 0; k < 256; k++)
428 const float x = logf((
float)k / 255.0f * (base_log - 1.0f) + 1.0f) / logf(base_log) * 255.0f;
429 const float y = logf(1.0 + hist[channels * k + channel]);
430 cairo_line_to(cr,
x, y);
432 cairo_line_to(cr, 255, 0);
433 cairo_close_path(cr);
441 cairo_move_to(cr, 0, 0);
442 for(
int k = 0; k < 256; k++) cairo_line_to(cr, k, logf(1.0 + hist[channels * k + channel]));
443 cairo_line_to(cr, 255, 0);
444 cairo_close_path(cr);
450 int32_t channel,
const gboolean
linear,
float base_log)
460static inline void dt_draw_histogram_8(cairo_t *cr,
const uint32_t *hist, int32_t channels, int32_t channel,
472 for(uint32_t y = 0; y <
height; y++)
475 uint8_t *
r, *
g, *
b, *
a, tmp;
476 r = &data[(y *
width +
x) * 4 + 0];
477 g = &data[(y *
width +
x) * 4 + 1];
478 b = &data[(y *
width +
x) * 4 + 2];
479 a = &data[(y *
width +
x) * 4 + 3];
489 float inv_a = 255.0 / *
a;
500 cairo_pattern_add_color_stop_rgba(grad, 0.0, 0.0, 0.0, 0.0, alpha);
501 cairo_pattern_add_color_stop_rgba(grad, 1.0, 1.0, 1.0, 1.0, alpha);
506 void (*dtgtk_cairo_paint_fct)(cairo_t *cr, gint
x, gint y, gint w, gint
h, gint
flags,
void *data))
509 GtkStyleContext *context = gtk_widget_get_style_context(widget);
510 GtkStateFlags state = gtk_widget_get_state_flags(widget);
511 gtk_style_context_get_color(context, state, &fg_color);
514 cairo_surface_t *cst = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, dim, dim);
515 cairo_t *cr = cairo_create(cst);
516 gdk_cairo_set_source_rgba(cr, &fg_color);
517 (*dtgtk_cairo_paint_fct)(cr, 0, 0, dim, dim,
flags, NULL);
519 uint8_t *data = cairo_image_surface_get_data(cst);
521 const size_t size = (size_t)dim * dim * 4;
522 uint8_t *buf = (uint8_t *)malloc(
size);
523 memcpy(buf, data,
size);
524 GdkPixbuf *pixbuf = gdk_pixbuf_new_from_data(buf, GDK_COLORSPACE_RGB,
TRUE, 8, dim, dim, dim * 4,
525 (GdkPixbufDestroyNotify)free, NULL);
526 cairo_surface_destroy(cst);
537 cairo_set_operator(cr, CAIRO_OPERATOR_CLEAR);
539 cairo_fill_preserve(cr);
542 cairo_set_operator(cr, CAIRO_OPERATOR_OVER);
560 cairo_set_dash(cr, NULL, 0, 0);
584 cairo_set_dash(cr, NULL, 0, 0);
588 const int pattern_len = 2;
589 cairo_set_dash(cr, pattern, pattern_len, 0);
603static 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)
611 const float pos = node_width * 0.7071f;
612 cairo_rectangle(cr,
x - pos, y - pos, node_width * 2.f, node_width * 2.f);
615 cairo_arc(cr,
x, y, node_width * 1.2f, 0.0, 2.0 *
M_PI);
623 cairo_set_line_width(cr, line_width);
625 cairo_fill_preserve(cr);
628 cairo_set_line_width(cr, (selected && !point_action) ? line_width * 2. : line_width);
635 cairo_arc(cr,
x, y, debug_radius, 0.0, 2.0 *
M_PI);
636 cairo_set_line_width(cr, line_width);
637 cairo_set_source_rgba(cr, 0.0, 1.0, 0.0, 1.0);
654static inline void dt_draw_handle(cairo_t *cr,
const float pt[2],
const float zoom_scale,
655 const float handle[2],
const gboolean selected,
const gboolean square)
666 float delta_x = handle[0] - pt[0];
667 float delta_y = handle[1] - pt[1];
668 float start_x = pt[0] + delta_x;
669 float start_y = pt[1] + delta_y;
670 float end_x = handle[0] - delta_x;
671 float end_y = handle[1] - delta_y;
672 cairo_move_to(cr, start_x, start_y);
673 cairo_line_to(cr, end_x, end_y);
677 cairo_stroke_preserve(cr);
689 const float square_width = handle_radius * 0.7071f;
690 cairo_rectangle(cr, handle[0] - square_width, handle[1] - square_width, square_width * 2.f, square_width * 2.f);
693 cairo_arc(cr, handle[0], handle[1], handle_radius, 0, 2.0 *
M_PI);
695 const float line_width_dark = selected
698 const float line_width_bright = selected
703 cairo_set_line_width(cr, line_width_dark * 1.125);
705 cairo_stroke_preserve(cr);
707 cairo_set_line_width(cr, line_width_bright * 1.5);
709 cairo_stroke_preserve(cr);
725typedef void (*
shape_draw_function_t)(cairo_t *cr,
const float *points,
const int points_count,
const int nb,
const gboolean border,
const gboolean source);
741 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)
745 cairo_set_line_cap(cr, line_cap);
750 if(points && points_count >= 2 && draw_shape_func)
751 (*draw_shape_func)(cr, points, points_count, nb, border,
FALSE);
758 const float line_width_dark = selected
761 const float line_width_bright = selected
766 cairo_set_line_width(cr, line_width_dark);
768 cairo_stroke_preserve(cr);
771 cairo_set_line_width(cr, line_width_bright);
788 const gboolean selected,
const float zoom_scale,
const cairo_line_cap_t line_cap)
790 dt_draw_shape_lines(dash_type, source, cr, 0, selected, zoom_scale, NULL, 0, NULL, line_cap);
793static void _draw_arrow_head(cairo_t *cr,
const float arrow[2],
const float arrow_x_a,
const float arrow_y_a,
794 const float arrow_x_b,
const float arrow_y_b)
797 cairo_move_to(cr, arrow_x_a, arrow_y_a);
798 cairo_line_to(cr, arrow[0], arrow[1]);
799 cairo_line_to(cr, arrow_x_b, arrow_y_b);
801 cairo_close_path(cr);
805 const float tail[2],
const gboolean draw_tail)
807 if(draw_tail)
dt_draw_line(cr, arrow_bud_x, arrow_bud_y, tail[0], tail[1]);
823static inline void dt_draw_arrow(cairo_t *cr,
const float zoom_scale,
const gboolean selected,
const gboolean draw_tail,
824 const dt_draw_dash_type_t dash_style,
const float arrow[2],
const float tail[2],
const float angle)
827 const float arrow_x_a = arrow[0] + (
DT_DRAW_SCALE_ARROW / zoom_scale) * cosf(angle + (0.4f));
828 const float arrow_y_a = arrow[1] + (
DT_DRAW_SCALE_ARROW / zoom_scale) * sinf(angle + (0.4f));
829 const float arrow_x_b = arrow[0] + (
DT_DRAW_SCALE_ARROW / zoom_scale) * cosf(angle - (0.4f));
830 const float arrow_y_b = arrow[1] + (
DT_DRAW_SCALE_ARROW / zoom_scale) * sinf(angle - (0.4f));
832 const float arrow_bud_x = (arrow_x_a + arrow_x_b) * 0.5f;
833 const float arrow_bud_y = (arrow_y_a + arrow_y_b) * 0.5f;
836 cairo_set_line_cap(cr, CAIRO_LINE_CAP_ROUND);
872 cairo_set_source_rgba(cr, 0., 0., 0., 0.);
873 cairo_fill_preserve(cr);
896static inline void dt_draw_cross(cairo_t *cr,
const float zoom_scale,
const float x,
const float y)
902 cairo_set_line_cap(cr, CAIRO_LINE_CAP_SQUARE);
907 cairo_move_to(cr,
x + dx, y);
908 cairo_line_to(cr,
x - dx, y);
909 cairo_move_to(cr,
x, y + dy);
910 cairo_line_to(cr,
x, y - dy);
911 cairo_stroke_preserve(cr);
921 const float *source_pts,
const int source_pts_count,
const int nodes_nb,
const shape_draw_function_t *draw_shape_func)
925 cairo_set_line_cap(cr, CAIRO_LINE_CAP_ROUND);
929 (*draw_shape_func)(cr, source_pts, source_pts_count, nodes_nb,
FALSE,
TRUE);
937 cairo_stroke_preserve(cr);
952 cairo_surface_t *cst = cairo_image_surface_create(CAIRO_FORMAT_ARGB32,
width,
height);
953 cairo_t *cr = cairo_create(cst);
957 guchar *data = cairo_image_surface_get_data(cst);
959 return gdk_pixbuf_new_from_data(data, GDK_COLORSPACE_RGB,
TRUE, 8,
width,
height,
960 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:669
const float h
Definition colorspaces_inline_conversions.h:1366
const float c
Definition colorspaces_inline_conversions.h:1365
const float g
Definition colorspaces_inline_conversions.h:925
const float d
Definition colorspaces_inline_conversions.h:931
static const float const float const float min
Definition colorspaces_inline_conversions.h:667
const float r
Definition colorspaces_inline_conversions.h:1324
const float max
Definition colorspaces_inline_conversions.h:721
const float b
Definition colorspaces_inline_conversions.h:1326
const float a
Definition colorspaces_inline_conversions.h:1292
const float top
Definition colorspaces_inline_conversions.h:672
typedef void((*dt_cache_allocate_t)(void *userdata, dt_cache_entry_t *entry))
darktable_t darktable
Definition darktable.c:178
@ DT_DEBUG_MASKS
Definition darktable.h:647
#define dt_free(ptr)
Definition darktable.h:380
static const dt_aligned_pixel_simd_t value
Definition darktable.h:501
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:535
#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:555
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:505
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:315
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:787
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:255
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:389
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:654
#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:896
#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:422
static void dt_draw_cairo_to_gdk_pixbuf(uint8_t *data, unsigned int width, unsigned int height)
Definition draw.h:470
static void dt_draw_histogram_8_linxlogy(cairo_t *cr, const uint32_t *hist, int32_t channels, int32_t channel)
Definition draw.h:438
static float dt_log_scale_axis(const float x, const float base)
Definition draw.h:188
static void _fill_clear_preserve(cairo_t *cr)
Definition draw.h:550
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:296
static void dt_draw_histogram_8_linxliny(cairo_t *cr, const uint32_t *hist, int32_t channels, int32_t channel)
Definition draw.h:379
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:242
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:225
static float dt_draw_curve_calc_value(dt_draw_curve_t *c, const float x)
Definition draw.h:351
static void dt_cairo_perceptual_gradient(cairo_pattern_t *grad, double alpha)
Definition draw.h:497
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:324
#define DT_DRAW_SCALE_ARROW
Definition draw.h:80
static void dt_draw_curve_destroy(dt_draw_curve_t *c)
Definition draw.h:284
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:342
#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:740
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:449
#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:290
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:823
static int dt_draw_curve_add_point(dt_draw_curve_t *c, const float x, const float y)
Definition draw.h:370
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:406
static GdkPixbuf * dt_draw_get_pixbuf_from_cairo(DTGTKCairoPaintIconFunc paint, const int width, const int height)
Definition draw.h:950
static void _fill_clear(cairo_t *cr)
Definition draw.h:545
#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:209
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:460
static dt_draw_curve_t * dt_draw_curve_new(const float min, const float max, unsigned int type)
Definition draw.h:268
#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:725
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:193
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:793
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:333
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:920
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:603
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:804
void(* DTGTKCairoPaintIconFunc)(cairo_t *cr, gint x, gint y, gint w, gint h, gint flags, void *data)
Definition dtgtk/paint.h:74
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:239
@ linear
Definition lightroom.c:368
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:847
int CurveDataSampleV2(CurveData *curve, CurveSample *sample)
Definition splines.cpp:751
Definition curve_tools.h:64
Definition curve_tools.h:84
unsigned int m_samplingRes
Definition curve_tools.h:86
struct dt_gui_gtk_t * gui
Definition darktable.h:703
int32_t unmuted
Definition darktable.h:688
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