Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
draw.h File Reference
#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>
+ Include dependency graph for draw.h:
+ This graph shows which files directly or indirectly include this file:

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_tdt_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))
 

Macro Definition Documentation

◆ M_PI

#define M_PI   3.141592654

some common drawing routines.

Typedef Documentation

◆ dt_draw_curve_t

wrapper around nikon curve.

Function Documentation

◆ dt_cairo_perceptual_gradient()

static void dt_cairo_perceptual_gradient ( cairo_pattern_t *  grad,
double  alpha 
)
inlinestatic

◆ dt_curve_to_mouse()

static float dt_curve_to_mouse ( const float  x,
const float  zoom_factor,
const float  offset 
)
inlinestatic

Referenced by dt_draw_grid_zoomed().

◆ dt_draw_cairo_to_gdk_pixbuf()

static void dt_draw_cairo_to_gdk_pixbuf ( uint8_t *  data,
unsigned int  width,
unsigned int  height 
)
inlinestatic

transform a data blob from cairo's premultiplied rgba/bgra to GdkPixbuf's un-premultiplied bgra/rgba

References height, and width.

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().

◆ dt_draw_curve_add_point()

static int dt_draw_curve_add_point ( dt_draw_curve_t c,
const float  x,
const float  y 
)
inlinestatic

◆ dt_draw_curve_calc_value()

◆ dt_draw_curve_calc_values()

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 
)
inlinestatic

◆ dt_draw_curve_calc_values_V2()

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 
)
inlinestatic

◆ dt_draw_curve_calc_values_V2_nonperiodic()

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 
)
inlinestatic

◆ dt_draw_curve_calc_values_V2_periodic()

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 
)
inlinestatic

◆ dt_draw_curve_destroy()

◆ dt_draw_curve_new()

static dt_draw_curve_t * dt_draw_curve_new ( const float  min,
const float  max,
unsigned int  type 
)
inlinestatic

◆ dt_draw_curve_set_point()

static void dt_draw_curve_set_point ( dt_draw_curve_t c,
const int  num,
const float  x,
const float  y 
)
inlinestatic

◆ dt_draw_curve_smaple_values()

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 
)
inlinestatic

◆ dt_draw_grid()

static void dt_draw_grid ( cairo_t *  cr,
const int  num,
const int  left,
const int  top,
const int  right,
const int  bottom 
)
inlinestatic

◆ dt_draw_grid_zoomed()

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 
)
inlinestatic

◆ dt_draw_histogram_8()

static void dt_draw_histogram_8 ( cairo_t *  cr,
const uint32_t *  hist,
int32_t  channels,
int32_t  channel,
const gboolean  linear 
)
inlinestatic

◆ dt_draw_histogram_8_linxliny()

static void dt_draw_histogram_8_linxliny ( cairo_t *  cr,
const uint32_t *  hist,
int32_t  channels,
int32_t  channel 
)
inlinestatic

Referenced by dt_draw_histogram_8().

◆ dt_draw_histogram_8_linxlogy()

static void dt_draw_histogram_8_linxlogy ( cairo_t *  cr,
const uint32_t *  hist,
int32_t  channels,
int32_t  channel 
)
inlinestatic

Referenced by dt_draw_histogram_8().

◆ dt_draw_histogram_8_log_base()

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 
)
inlinestatic

◆ dt_draw_histogram_8_logxliny()

static void dt_draw_histogram_8_logxliny ( cairo_t *  cr,
const uint32_t *  hist,
int32_t  channels,
int32_t  channel,
float  base_log 
)
inlinestatic

◆ dt_draw_histogram_8_logxlogy()

static void dt_draw_histogram_8_logxlogy ( cairo_t *  cr,
const uint32_t *  hist,
int32_t  channels,
int32_t  channel,
float  base_log 
)
inlinestatic

◆ dt_draw_histogram_8_zoomed()

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 
)
inlinestatic

References linear.

Referenced by _area_draw_callback(), and _area_draw_callback().

◆ dt_draw_horizontal_lines()

static void dt_draw_horizontal_lines ( cairo_t *  cr,
const int  num,
const int  left,
const int  top,
const int  right,
const int  bottom 
)
inlinestatic

References height.

Referenced by dt_guides_draw_grid().

◆ dt_draw_line()

◆ dt_draw_loglog_grid()

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 
)
inlinestatic

◆ dt_draw_paint_to_pixbuf()

static GdkPixbuf * dt_draw_paint_to_pixbuf ( GtkWidget *  widget,
const guint  pixbuf_size,
const int  flags,
void(*)(cairo_t *cr, gint x, gint y, gint w, gint h, gint flags, void *data)  dtgtk_cairo_paint_fct 
)
inlinestatic

◆ dt_draw_semilog_x_grid()

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 
)
inlinestatic

◆ dt_draw_semilog_y_grid()

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 
)
inlinestatic

◆ dt_draw_set_color_overlay()

◆ dt_draw_star()

static void dt_draw_star ( cairo_t *  cr,
float  x,
float  y,
float  r1,
float  r2 
)
inlinestatic

draws a rating star

References M_PI.

Referenced by dtgtk_cairo_paint_overlays(), dtgtk_cairo_paint_star(), and dtgtk_cairo_paint_unratestar().

◆ dt_draw_vertical_lines()

static void dt_draw_vertical_lines ( cairo_t *  cr,
const int  num,
const int  left,
const int  top,
const int  right,
const int  bottom 
)
inlinestatic

◆ dt_log_scale_axis()

static float dt_log_scale_axis ( const float  x,
const float  base 
)
inlinestatic