Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
liquify.c File Reference
#include "bauhaus/bauhaus.h"
#include "common/interpolation.h"
#include "common/opencl.h"
#include "common/math.h"
#include "common/collection.h"
#include "control/conf.h"
#include "control/control.h"
#include "develop/imageop.h"
#include "develop/imageop_gui.h"
#include "gui/gtk.h"
#include "iop/iop_api.h"
#include <assert.h>
#include <cairo.h>
#include <complex.h>
#include <stdlib.h>
+ Include dependency graph for liquify.c:

Data Structures

struct  dt_liquify_rgba_t
 
struct  dt_liquify_layer_t
 
struct  dt_liquify_path_header_t
 
struct  dt_liquify_warp_t
 
struct  dt_liquify_node_t
 
struct  dt_liquify_path_data_t
 
struct  dt_liquify_hit_t
 
struct  dt_iop_liquify_params_t
 
struct  dt_iop_liquify_global_data_t
 
struct  dt_iop_liquify_gui_data_t
 
struct  distort_params_t
 
struct  restart_cookie_t
 

Macros

#define MAX_NODES   100
 
#define CONF_RADIUS   "plugins/darkroom/liquify/radius"
 
#define CONF_ANGLE   "plugins/darkroom/liquify/angle"
 
#define CONF_STRENGTH   "plugins/darkroom/liquify/strength"
 
#define COLOR_NULL   { 0.0, 0.0, 0.0, 0.8 }
 
#define GREY   { 0.3, 0.3, 0.3, 0.8 }
 
#define LGREY   { 0.8, 0.8, 0.8, 1.0 }
 
#define COLOR_DEBUG   { 0.9, 0.9, 0.0, 1.0 }
 
#define GET_UI_WIDTH(a)   (get_ui_width(scale, DT_LIQUIFY_UI_WIDTH_##a))
 
#define FG_COLOR   set_source_rgba(cr, fg_color)
 
#define BG_COLOR   set_source_rgba(cr, bg_color)
 
#define VERYTHINLINE   set_line_width (cr, scale / 2.0f, DT_LIQUIFY_UI_WIDTH_THINLINE)
 
#define THINLINE   set_line_width (cr, scale, DT_LIQUIFY_UI_WIDTH_THINLINE)
 
#define THICKLINE   set_line_width (cr, scale, DT_LIQUIFY_UI_WIDTH_THICKLINE)
 
#define CHECK_HIT_PT(point)
 
#define ABCD(A, B, C, D)   { { a[i] = A; b[i] = B; c[i] = C; d[i] = D; continue; } }
 
#define PREAMBLE
 
#define POSTAMBLE
 

Enumerations

enum  dt_liquify_layer_enum_t {
  DT_LIQUIFY_LAYER_BACKGROUND ,
  DT_LIQUIFY_LAYER_RADIUS ,
  DT_LIQUIFY_LAYER_HARDNESS1 ,
  DT_LIQUIFY_LAYER_HARDNESS2 ,
  DT_LIQUIFY_LAYER_WARPS ,
  DT_LIQUIFY_LAYER_PATH ,
  DT_LIQUIFY_LAYER_CTRLPOINT1_HANDLE ,
  DT_LIQUIFY_LAYER_CTRLPOINT2_HANDLE ,
  DT_LIQUIFY_LAYER_RADIUSPOINT_HANDLE ,
  DT_LIQUIFY_LAYER_HARDNESSPOINT1_HANDLE ,
  DT_LIQUIFY_LAYER_HARDNESSPOINT2_HANDLE ,
  DT_LIQUIFY_LAYER_STRENGTHPOINT_HANDLE ,
  DT_LIQUIFY_LAYER_CENTERPOINT ,
  DT_LIQUIFY_LAYER_CTRLPOINT1 ,
  DT_LIQUIFY_LAYER_CTRLPOINT2 ,
  DT_LIQUIFY_LAYER_RADIUSPOINT ,
  DT_LIQUIFY_LAYER_HARDNESSPOINT1 ,
  DT_LIQUIFY_LAYER_HARDNESSPOINT2 ,
  DT_LIQUIFY_LAYER_STRENGTHPOINT ,
  DT_LIQUIFY_LAYER_LAST
}
 
enum  dt_liquify_layer_flag_enum_t {
  DT_LIQUIFY_LAYER_FLAG_HIT_TEST = 1 ,
  DT_LIQUIFY_LAYER_FLAG_PREV_SELECTED = 2 ,
  DT_LIQUIFY_LAYER_FLAG_NODE_SELECTED = 4 ,
  DT_LIQUIFY_LAYER_FLAG_POINT_TOOL = 8 ,
  DT_LIQUIFY_LAYER_FLAG_LINE_TOOL = 16 ,
  DT_LIQUIFY_LAYER_FLAG_CURVE_TOOL = 32 ,
  DT_LIQUIFY_LAYER_FLAG_NODE_TOOL = 64 ,
  DT_LIQUIFY_LAYER_FLAG_ANY_TOOL = 8 + 16 + 32 + 64
}
 
enum  dt_liquify_ui_width_enum_t {
  DT_LIQUIFY_UI_WIDTH_THINLINE ,
  DT_LIQUIFY_UI_WIDTH_THICKLINE ,
  DT_LIQUIFY_UI_WIDTH_DOUBLELINE ,
  DT_LIQUIFY_UI_WIDTH_GIZMO ,
  DT_LIQUIFY_UI_WIDTH_GIZMO_SMALL ,
  DT_LIQUIFY_UI_WIDTH_DEFAULT_RADIUS ,
  DT_LIQUIFY_UI_WIDTH_DEFAULT_STRENGTH ,
  DT_LIQUIFY_UI_WIDTH_MIN_DRAG ,
  DT_LIQUIFY_UI_WIDTH_LAST
}
 
enum  dt_liquify_warp_type_enum_t {
  DT_LIQUIFY_WARP_TYPE_LINEAR ,
  DT_LIQUIFY_WARP_TYPE_RADIAL_GROW ,
  DT_LIQUIFY_WARP_TYPE_RADIAL_SHRINK ,
  DT_LIQUIFY_WARP_TYPE_LAST
}
 
enum  dt_liquify_node_type_enum_t {
  DT_LIQUIFY_NODE_TYPE_CUSP ,
  DT_LIQUIFY_NODE_TYPE_SMOOTH ,
  DT_LIQUIFY_NODE_TYPE_SYMMETRICAL ,
  DT_LIQUIFY_NODE_TYPE_AUTOSMOOTH ,
  DT_LIQUIFY_NODE_TYPE_LAST
}
 
enum  dt_liquify_status_enum_t {
  DT_LIQUIFY_STATUS_NONE = 0 ,
  DT_LIQUIFY_STATUS_NEW = 1 ,
  DT_LIQUIFY_STATUS_INTERPOLATED = 2 ,
  DT_LIQUIFY_STATUS_PREVIEW = 4 ,
  DT_LIQUIFY_STATUS_LAST
}
 
enum  dt_liquify_path_data_enum_t {
  DT_LIQUIFY_PATH_INVALIDATED = 0 ,
  DT_LIQUIFY_PATH_MOVE_TO_V1 ,
  DT_LIQUIFY_PATH_LINE_TO_V1 ,
  DT_LIQUIFY_PATH_CURVE_TO_V1
}
 

Functions

const char * name ()
 
const char ** description (struct dt_iop_module_t *self)
 
int default_group ()
 
int flags ()
 
int operation_tags ()
 
int default_colorspace (dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece)
 
static float get_rot (const dt_liquify_warp_type_enum_t warp_type)
 
static dt_liquify_path_data_tnode_alloc (dt_iop_liquify_params_t *p, int *node_index)
 
static dt_liquify_path_data_tnode_prev (dt_iop_liquify_params_t *p, const dt_liquify_path_data_t *n)
 
static dt_liquify_path_data_tnode_get (dt_iop_liquify_params_t *p, const int index)
 
static dt_liquify_path_data_tnode_next (dt_iop_liquify_params_t *p, const dt_liquify_path_data_t *n)
 
static void node_insert_before (dt_iop_liquify_params_t *p, dt_liquify_path_data_t *this, dt_liquify_path_data_t *new)
 
static void node_gc (dt_iop_liquify_params_t *p)
 
static void node_delete (dt_iop_liquify_params_t *p, dt_liquify_path_data_t *this)
 
static void path_delete (dt_iop_liquify_params_t *p, dt_liquify_path_data_t *this)
 
static void _distort_paths (const struct dt_iop_module_t *module, const distort_params_t *params, const dt_iop_liquify_params_t *p)
 
static void distort_paths_raw_to_piece (const struct dt_iop_module_t *module, dt_dev_pixelpipe_t *pipe, const float roi_in_scale, dt_iop_liquify_params_t *p, const gboolean from_distort_transform)
 
static float complex normalize (const float complex v)
 
static float mix (const float a, const float b, const float t)
 
static float complex cmix (const float complex p0, const float complex p1, const float t)
 
static void mix_warps (dt_liquify_warp_t *result, const dt_liquify_warp_t *warp1, const dt_liquify_warp_t *warp2, const complex float pt, const float t)
 
static void interpolate_cubic_bezier (const float complex p0, const float complex p1, const float complex p2, const float complex p3, float complex buffer[], const int n)
 
static GList * interpolate_paths (dt_iop_liquify_params_t *p)
 
static float get_arc_length (const float complex points[], const int n_points)
 
static float complex point_at_arc_length (const float complex points[], const int n_points, const float arc_length, restart_cookie_t *restart)
 
static float * build_lookup_table (const int distance, const float control1, const float control2)
 
static void compute_round_stamp_extent (cairo_rectangle_int_t *const restrict stamp_extent, const dt_liquify_warp_t *const restrict warp)
 
static void build_round_stamp (float complex **pstamp, cairo_rectangle_int_t *const restrict stamp_extent, const dt_liquify_warp_t *const restrict warp)
 
static void add_to_global_distortion_map (float complex *global_map, const cairo_rectangle_int_t *const restrict global_map_extent, const dt_liquify_warp_t *const restrict warp, const float complex *const restrict stamp, const cairo_rectangle_int_t *stamp_extent)
 
static void apply_global_distortion_map (struct dt_iop_module_t *module, dt_dev_pixelpipe_iop_t *piece, const float *const restrict in, float *const restrict out, const dt_iop_roi_t *const roi_in, const dt_iop_roi_t *const roi_out, const float complex *const map, const cairo_rectangle_int_t *extent)
 
static GSList * _get_map_extent (const dt_iop_roi_t *roi_out, const GList *interpolated, cairo_rectangle_int_t *map_extent)
 
static float complex * create_global_distortion_map (const cairo_rectangle_int_t *map_extent, const GSList *interpolated, gboolean inverted)
 
static float complex * build_global_distortion_map (struct dt_iop_module_t *module, const dt_dev_pixelpipe_iop_t *piece, const dt_iop_roi_t *roi_in, const dt_iop_roi_t *roi_out, cairo_rectangle_int_t *map_extent)
 
void modify_roi_out (struct dt_iop_module_t *module, struct dt_dev_pixelpipe_iop_t *piece, dt_iop_roi_t *roi_out, const dt_iop_roi_t *roi_in)
 
void modify_roi_in (struct dt_iop_module_t *module, struct dt_dev_pixelpipe_iop_t *piece, const dt_iop_roi_t *roi_out, dt_iop_roi_t *roi_in)
 
static int _distort_xtransform (dt_iop_module_t *self, dt_dev_pixelpipe_iop_t *piece, float *const restrict points, const size_t points_count, const gboolean inverted)
 
static void start_drag (dt_iop_liquify_gui_data_t *g, dt_liquify_layer_enum_t layer, dt_liquify_path_data_t *elem)
 
static void end_drag (dt_iop_liquify_gui_data_t *g)
 
static gboolean is_dragging (const dt_iop_liquify_gui_data_t *g)
 
int distort_transform (dt_iop_module_t *self, dt_dev_pixelpipe_iop_t *piece, float *const restrict points, size_t points_count)
 
int distort_backtransform (dt_iop_module_t *self, dt_dev_pixelpipe_iop_t *piece, float *const restrict points, size_t points_count)
 
void distort_mask (struct dt_iop_module_t *self, struct dt_dev_pixelpipe_iop_t *piece, const float *const in, float *const out, const dt_iop_roi_t *const roi_in, const dt_iop_roi_t *const roi_out)
 
void process (struct dt_iop_module_t *module, dt_dev_pixelpipe_iop_t *piece, const void *const in, void *const out, const dt_iop_roi_t *const roi_in, const dt_iop_roi_t *const roi_out)
 
void init_global (dt_iop_module_so_t *module)
 
void cleanup_global (dt_iop_module_so_t *module)
 
void init (dt_iop_module_t *module)
 
void init_pipe (struct dt_iop_module_t *module, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece)
 
void cleanup_pipe (struct dt_iop_module_t *module, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece)
 
void commit_params (struct dt_iop_module_t *module, dt_iop_params_t *params, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece)
 
static float cdot (const float complex p0, const float complex p1)
 
static void draw_rectangle (cairo_t *cr, const float complex pt, const double theta, const double size)
 
static void draw_triangle (cairo_t *cr, const float complex pt, const double theta, const double size)
 
static void draw_circle (cairo_t *cr, const float complex pt, const double diameter)
 
static void set_source_rgba (cairo_t *cr, dt_liquify_rgba_t rgba)
 
static float get_ui_width (const float scale, const dt_liquify_ui_width_enum_t w)
 
static void set_line_width (cairo_t *cr, double scale, dt_liquify_ui_width_enum_t w)
 
static gboolean detect_drag (const dt_iop_liquify_gui_data_t *g, const double scale, const float complex pt)
 
static void update_warp_count (const dt_iop_liquify_gui_data_t *g)
 
static void _draw_paths (dt_iop_module_t *module, cairo_t *cr, const float scale, dt_iop_liquify_params_t *p, GList *layers)
 
static float find_nearest_on_curve_t (const float complex p0, const float complex p1, const float complex p2, const float complex p3, const float complex x, const int n)
 
static float find_nearest_on_line_t (const float complex p0, const float complex p1, const float complex x)
 
static void casteljau (const float complex *p0, float complex *p1, float complex *p2, float complex *p3, const float t)
 
static dt_liquify_hit_t _hit_paths (dt_iop_module_t *module, dt_iop_liquify_params_t *p, GList *layers, const float complex *pt)
 
static void draw_paths (struct dt_iop_module_t *module, cairo_t *cr, const float scale, dt_iop_liquify_params_t *params)
 
static dt_liquify_hit_t _hit_test_paths (struct dt_iop_module_t *module, dt_iop_liquify_params_t *params, float complex pt)
 
static void smooth_path_linsys (size_t n, const float complex *k, float complex *c1, float complex *c2, const int *equation)
 
static int path_length (dt_iop_liquify_params_t *p, dt_liquify_path_data_t *n)
 
static void smooth_paths_linsys (dt_iop_liquify_params_t *params)
 
static dt_liquify_path_data_tfind_hovered (dt_iop_liquify_params_t *p)
 
static void init_warp (dt_liquify_warp_t *warp, float complex point)
 
static dt_liquify_path_data_talloc_move_to (dt_iop_module_t *module, float complex start_point)
 
static dt_liquify_path_data_talloc_line_to (dt_iop_module_t *module, float complex end_point)
 
static dt_liquify_path_data_talloc_curve_to (dt_iop_module_t *module, float complex end_point)
 
static void unselect_all (dt_iop_liquify_params_t *p)
 
static float get_zoom_scale (dt_develop_t *develop)
 
void gui_post_expose (struct dt_iop_module_t *module, cairo_t *cr, int32_t width, int32_t height, int32_t pointerx, int32_t pointery)
 
static gboolean btn_make_radio_callback (GtkToggleButton *btn, GdkEventButton *event, dt_iop_module_t *module)
 
void gui_focus (struct dt_iop_module_t *module, gboolean in)
 
static void sync_pipe (struct dt_iop_module_t *module, gboolean history)
 
static void get_point_scale (struct dt_iop_module_t *module, float x, float y, float complex *pt, float *scale)
 
int mouse_moved (struct dt_iop_module_t *module, double x, double y, double pressure, int which)
 
static float dt_conf_get_sanitize_float (const char *name, float min, float max, float default_value)
 
static void get_stamp_params (dt_iop_module_t *module, float *radius, float *r_strength, float *phi)
 
int scrolled (struct dt_iop_module_t *module, double x, double y, int up, uint32_t state)
 
int button_pressed (struct dt_iop_module_t *module, double x, double y, double pressure, int which, int type, uint32_t state)
 
static void _start_new_shape (dt_iop_module_t *module)
 
int button_released (struct dt_iop_module_t *module, double x, double y, int which, uint32_t state)
 
static void _liquify_cairo_paint_point_tool (cairo_t *cr, const gint x, const gint y, const gint w, const gint h, const gint flags, void *data)
 
static void _liquify_cairo_paint_line_tool (cairo_t *cr, const gint x, const gint y, const gint w, const gint h, const gint flags, void *data)
 
static void _liquify_cairo_paint_curve_tool (cairo_t *cr, const gint x, const gint y, const gint w, const gint h, const gint flags, void *data)
 
static void _liquify_cairo_paint_node_tool (cairo_t *cr, const gint x, const gint y, const gint w, const gint h, const gint flags, void *data)
 
void gui_update (dt_iop_module_t *module)
 
void gui_init (dt_iop_module_t *self)
 
void gui_reset (dt_iop_module_t *self)
 
void gui_cleanup (dt_iop_module_t *self)
 

Variables

const int LOOKUP_OVERSAMPLE = 10
 
const int INTERPOLATION_POINTS = 100
 
const float STAMP_RELOCATION = 0.1
 
static const dt_liquify_rgba_t DT_LIQUIFY_COLOR_SELECTED = { 1.0, 1.0, 1.0, 1.0 }
 
static const dt_liquify_rgba_t DT_LIQUIFY_COLOR_HOVER = { 1.0, 1.0, 1.0, 0.8 }
 
dt_liquify_layer_t dt_liquify_layers []
 
float dt_liquify_ui_widths []
 
static const dt_liquify_hit_t NOWHERE = { DT_LIQUIFY_LAYER_BACKGROUND, NULL }
 

Macro Definition Documentation

◆ ABCD

#define ABCD (   A,
  B,
  C,
 
)    { { a[i] = A; b[i] = B; c[i] = C; d[i] = D; continue; } }

◆ BG_COLOR

#define BG_COLOR   set_source_rgba(cr, bg_color)

◆ CHECK_HIT_PT

#define CHECK_HIT_PT (   point)
Value:
const float d = cabsf(point - (*pt)); \
if(d < distance) \
{ \
distance = d; \
hit.layer = layer; \
hit.elem = data; \
}
Definition ashift_lsd.c:181

◆ COLOR_DEBUG

#define COLOR_DEBUG   { 0.9, 0.9, 0.0, 1.0 }

◆ COLOR_NULL

#define COLOR_NULL   { 0.0, 0.0, 0.0, 0.8 }

◆ CONF_ANGLE

#define CONF_ANGLE   "plugins/darkroom/liquify/angle"

◆ CONF_RADIUS

#define CONF_RADIUS   "plugins/darkroom/liquify/radius"

◆ CONF_STRENGTH

#define CONF_STRENGTH   "plugins/darkroom/liquify/strength"

◆ FG_COLOR

#define FG_COLOR   set_source_rgba(cr, fg_color)

◆ GET_UI_WIDTH

#define GET_UI_WIDTH (   a)    (get_ui_width(scale, DT_LIQUIFY_UI_WIDTH_##a))

◆ GREY

#define GREY   { 0.3, 0.3, 0.3, 0.8 }

◆ LGREY

#define LGREY   { 0.8, 0.8, 0.8, 1.0 }

◆ MAX_NODES

#define MAX_NODES   100

◆ POSTAMBLE

#define POSTAMBLE
Value:
cairo_pop_group_to_source(cr); \
cairo_paint_with_alpha(cr, flags & CPF_ACTIVE ? 1.0 : 0.5); \
cairo_restore(cr);
int flags()
Definition liquify.c:307
@ CPF_ACTIVE
Definition paint.h:39

◆ PREAMBLE

#define PREAMBLE
Value:
cairo_save(cr); \
const gint s = MIN(w, h); \
cairo_translate(cr, x + (w / 2.0) - (s / 2.0), \
y + (h / 2.0) - (s / 2.0)); \
cairo_scale(cr, s, s); \
cairo_push_group(cr); \
cairo_set_source_rgba(cr, 1.0, 1.0, 1.0, 1.0); \
cairo_set_line_cap(cr, CAIRO_LINE_CAP_ROUND); \
cairo_set_line_width(cr, 0.2);
#define MIN(a, b)
Definition thinplate.c:23

◆ THICKLINE

#define THICKLINE   set_line_width (cr, scale, DT_LIQUIFY_UI_WIDTH_THICKLINE)

◆ THINLINE

#define THINLINE   set_line_width (cr, scale, DT_LIQUIFY_UI_WIDTH_THINLINE)

◆ VERYTHINLINE

#define VERYTHINLINE   set_line_width (cr, scale / 2.0f, DT_LIQUIFY_UI_WIDTH_THINLINE)

Enumeration Type Documentation

◆ dt_liquify_layer_enum_t

Enumerator
DT_LIQUIFY_LAYER_BACKGROUND 
DT_LIQUIFY_LAYER_RADIUS 
DT_LIQUIFY_LAYER_HARDNESS1 
DT_LIQUIFY_LAYER_HARDNESS2 
DT_LIQUIFY_LAYER_WARPS 
DT_LIQUIFY_LAYER_PATH 
DT_LIQUIFY_LAYER_CTRLPOINT1_HANDLE 
DT_LIQUIFY_LAYER_CTRLPOINT2_HANDLE 
DT_LIQUIFY_LAYER_RADIUSPOINT_HANDLE 
DT_LIQUIFY_LAYER_HARDNESSPOINT1_HANDLE 
DT_LIQUIFY_LAYER_HARDNESSPOINT2_HANDLE 
DT_LIQUIFY_LAYER_STRENGTHPOINT_HANDLE 
DT_LIQUIFY_LAYER_CENTERPOINT 
DT_LIQUIFY_LAYER_CTRLPOINT1 
DT_LIQUIFY_LAYER_CTRLPOINT2 
DT_LIQUIFY_LAYER_RADIUSPOINT 
DT_LIQUIFY_LAYER_HARDNESSPOINT1 
DT_LIQUIFY_LAYER_HARDNESSPOINT2 
DT_LIQUIFY_LAYER_STRENGTHPOINT 
DT_LIQUIFY_LAYER_LAST 

◆ dt_liquify_layer_flag_enum_t

Enumerator
DT_LIQUIFY_LAYER_FLAG_HIT_TEST 

include layer in hit testing

DT_LIQUIFY_LAYER_FLAG_PREV_SELECTED 

show if previous node is selected

DT_LIQUIFY_LAYER_FLAG_NODE_SELECTED 

show if node is selected

DT_LIQUIFY_LAYER_FLAG_POINT_TOOL 

show if point tool active

DT_LIQUIFY_LAYER_FLAG_LINE_TOOL 

show if line tool active

DT_LIQUIFY_LAYER_FLAG_CURVE_TOOL 

show if line tool active

DT_LIQUIFY_LAYER_FLAG_NODE_TOOL 

show if node tool active

DT_LIQUIFY_LAYER_FLAG_ANY_TOOL 

◆ dt_liquify_node_type_enum_t

Enumerator
DT_LIQUIFY_NODE_TYPE_CUSP 
DT_LIQUIFY_NODE_TYPE_SMOOTH 
DT_LIQUIFY_NODE_TYPE_SYMMETRICAL 
DT_LIQUIFY_NODE_TYPE_AUTOSMOOTH 
DT_LIQUIFY_NODE_TYPE_LAST 

◆ dt_liquify_path_data_enum_t

Enumerator
DT_LIQUIFY_PATH_INVALIDATED 
DT_LIQUIFY_PATH_MOVE_TO_V1 
DT_LIQUIFY_PATH_LINE_TO_V1 
DT_LIQUIFY_PATH_CURVE_TO_V1 

◆ dt_liquify_status_enum_t

Enumerator
DT_LIQUIFY_STATUS_NONE 
DT_LIQUIFY_STATUS_NEW 
DT_LIQUIFY_STATUS_INTERPOLATED 
DT_LIQUIFY_STATUS_PREVIEW 
DT_LIQUIFY_STATUS_LAST 

◆ dt_liquify_ui_width_enum_t

Enumerator
DT_LIQUIFY_UI_WIDTH_THINLINE 
DT_LIQUIFY_UI_WIDTH_THICKLINE 
DT_LIQUIFY_UI_WIDTH_DOUBLELINE 
DT_LIQUIFY_UI_WIDTH_GIZMO 
DT_LIQUIFY_UI_WIDTH_GIZMO_SMALL 
DT_LIQUIFY_UI_WIDTH_DEFAULT_RADIUS 
DT_LIQUIFY_UI_WIDTH_DEFAULT_STRENGTH 
DT_LIQUIFY_UI_WIDTH_MIN_DRAG 
DT_LIQUIFY_UI_WIDTH_LAST 

◆ dt_liquify_warp_type_enum_t

Enumerator
DT_LIQUIFY_WARP_TYPE_LINEAR 
DT_LIQUIFY_WARP_TYPE_RADIAL_GROW 
DT_LIQUIFY_WARP_TYPE_RADIAL_SHRINK 
DT_LIQUIFY_WARP_TYPE_LAST 

Function Documentation

◆ _distort_paths()

◆ _distort_xtransform()

static int _distort_xtransform ( dt_iop_module_t self,
dt_dev_pixelpipe_iop_t piece,
float *const restrict  points,
const size_t  points_count,
const gboolean  inverted 
)
static

◆ _draw_paths()

static void _draw_paths ( dt_iop_module_t module,
cairo_t *  cr,
const float  scale,
dt_iop_liquify_params_t p,
GList *  layers 
)
static

References dt_liquify_layer_t::bg, BG_COLOR, cmix(), dt_liquify_warp_t::control1, dt_liquify_warp_t::control2, dt_liquify_node_t::ctrl1, dt_liquify_node_t::ctrl2, draw_circle(), draw_rectangle(), draw_triangle(), DT_LIQUIFY_COLOR_HOVER, DT_LIQUIFY_COLOR_SELECTED, DT_LIQUIFY_LAYER_CENTERPOINT, DT_LIQUIFY_LAYER_CTRLPOINT1, DT_LIQUIFY_LAYER_CTRLPOINT1_HANDLE, DT_LIQUIFY_LAYER_CTRLPOINT2, DT_LIQUIFY_LAYER_CTRLPOINT2_HANDLE, DT_LIQUIFY_LAYER_FLAG_NODE_SELECTED, DT_LIQUIFY_LAYER_FLAG_PREV_SELECTED, DT_LIQUIFY_LAYER_HARDNESS1, DT_LIQUIFY_LAYER_HARDNESS2, DT_LIQUIFY_LAYER_HARDNESSPOINT1, DT_LIQUIFY_LAYER_HARDNESSPOINT1_HANDLE, DT_LIQUIFY_LAYER_HARDNESSPOINT2, DT_LIQUIFY_LAYER_HARDNESSPOINT2_HANDLE, DT_LIQUIFY_LAYER_PATH, DT_LIQUIFY_LAYER_RADIUS, DT_LIQUIFY_LAYER_RADIUSPOINT, DT_LIQUIFY_LAYER_RADIUSPOINT_HANDLE, DT_LIQUIFY_LAYER_STRENGTHPOINT, DT_LIQUIFY_LAYER_STRENGTHPOINT_HANDLE, DT_LIQUIFY_LAYER_WARPS, dt_liquify_layers, DT_LIQUIFY_NODE_TYPE_AUTOSMOOTH, DT_LIQUIFY_NODE_TYPE_CUSP, DT_LIQUIFY_NODE_TYPE_SMOOTH, DT_LIQUIFY_NODE_TYPE_SYMMETRICAL, DT_LIQUIFY_PATH_CURVE_TO_V1, DT_LIQUIFY_PATH_INVALIDATED, DT_LIQUIFY_PATH_LINE_TO_V1, DT_LIQUIFY_PATH_MOVE_TO_V1, DT_LIQUIFY_WARP_TYPE_LINEAR, DT_M_PI, dt_liquify_layer_t::fg, FG_COLOR, flags(), get_rot(), GET_UI_WIDTH, dt_iop_module_t::gui_data, dt_liquify_path_data_t::header, dt_liquify_layer_t::hover_master, dt_liquify_path_header_t::hovered, interpolate_paths(), is_dragging(), MAX_NODES, dt_liquify_path_data_t::node, node_prev(), dt_liquify_path_header_t::node_type, dt_liquify_warp_t::point, dt_liquify_warp_t::radius, dt_liquify_path_header_t::selected, dt_liquify_warp_t::strength, THICKLINE, THINLINE, dt_liquify_path_header_t::type, dt_liquify_warp_t::type, VERYTHINLINE, and dt_liquify_path_data_t::warp.

Referenced by draw_paths().

◆ _get_map_extent()

static GSList * _get_map_extent ( const dt_iop_roi_t roi_out,
const GList *  interpolated,
cairo_rectangle_int_t *  map_extent 
)
static

◆ _hit_paths()

◆ _hit_test_paths()

static dt_liquify_hit_t _hit_test_paths ( struct dt_iop_module_t module,
dt_iop_liquify_params_t params,
float complex  pt 
)
static

◆ _liquify_cairo_paint_curve_tool()

static void _liquify_cairo_paint_curve_tool ( cairo_t *  cr,
const gint  x,
const gint  y,
const gint  w,
const gint  h,
const gint  flags,
void data 
)
static

References POSTAMBLE, and PREAMBLE.

Referenced by gui_init().

◆ _liquify_cairo_paint_line_tool()

static void _liquify_cairo_paint_line_tool ( cairo_t *  cr,
const gint  x,
const gint  y,
const gint  w,
const gint  h,
const gint  flags,
void data 
)
static

References POSTAMBLE, and PREAMBLE.

Referenced by gui_init().

◆ _liquify_cairo_paint_node_tool()

static void _liquify_cairo_paint_node_tool ( cairo_t *  cr,
const gint  x,
const gint  y,
const gint  w,
const gint  h,
const gint  flags,
void data 
)
static

References POSTAMBLE, and PREAMBLE.

Referenced by gui_init().

◆ _liquify_cairo_paint_point_tool()

static void _liquify_cairo_paint_point_tool ( cairo_t *  cr,
const gint  x,
const gint  y,
const gint  w,
const gint  h,
const gint  flags,
void data 
)
static

References DT_M_PI, POSTAMBLE, and PREAMBLE.

Referenced by gui_init().

◆ _start_new_shape()

◆ add_to_global_distortion_map()

static void add_to_global_distortion_map ( float complex *  global_map,
const cairo_rectangle_int_t *const restrict  global_map_extent,
const dt_liquify_warp_t *const restrict  warp,
const float complex *const restrict  stamp,
const cairo_rectangle_int_t *  stamp_extent 
)
static

◆ alloc_curve_to()

static dt_liquify_path_data_t * alloc_curve_to ( dt_iop_module_t module,
float complex  end_point 
)
static

◆ alloc_line_to()

◆ alloc_move_to()

◆ apply_global_distortion_map()

static void apply_global_distortion_map ( struct dt_iop_module_t module,
dt_dev_pixelpipe_iop_t piece,
const float *const restrict  in,
float *const restrict  out,
const dt_iop_roi_t *const  roi_in,
const dt_iop_roi_t *const  roi_out,
const float complex *const  map,
const cairo_rectangle_int_t *  extent 
)
static

◆ btn_make_radio_callback()

static gboolean btn_make_radio_callback ( GtkToggleButton *  btn,
GdkEventButton *  event,
dt_iop_module_t module 
)
static

◆ build_global_distortion_map()

static float complex * build_global_distortion_map ( struct dt_iop_module_t module,
const dt_dev_pixelpipe_iop_t piece,
const dt_iop_roi_t roi_in,
const dt_iop_roi_t roi_out,
cairo_rectangle_int_t *  map_extent 
)
static

◆ build_lookup_table()

static float * build_lookup_table ( const int  distance,
const float  control1,
const float  control2 
)
static

◆ build_round_stamp()

static void build_round_stamp ( float complex **  pstamp,
cairo_rectangle_int_t *const restrict  stamp_extent,
const dt_liquify_warp_t *const restrict  warp 
)
static

◆ button_pressed()

◆ button_released()

◆ casteljau()

static void casteljau ( const float complex *  p0,
float complex *  p1,
float complex *  p2,
float complex *  p3,
const float  t 
)
static

Referenced by _hit_paths(), and button_released().

◆ cdot()

static float cdot ( const float complex  p0,
const float complex  p1 
)
static

Referenced by find_nearest_on_line_t().

◆ cleanup_global()

◆ cleanup_pipe()

void cleanup_pipe ( struct dt_iop_module_t module,
dt_dev_pixelpipe_t pipe,
dt_dev_pixelpipe_iop_t piece 
)

◆ cmix()

static float complex cmix ( const float complex  p0,
const float complex  p1,
const float  t 
)
inlinestatic

◆ commit_params()

void commit_params ( struct dt_iop_module_t module,
dt_iop_params_t params,
dt_dev_pixelpipe_t pipe,
dt_dev_pixelpipe_iop_t piece 
)

◆ compute_round_stamp_extent()

static void compute_round_stamp_extent ( cairo_rectangle_int_t *const restrict  stamp_extent,
const dt_liquify_warp_t *const restrict  warp 
)
static

Referenced by _get_map_extent().

◆ create_global_distortion_map()

static float complex * create_global_distortion_map ( const cairo_rectangle_int_t *  map_extent,
const GSList *  interpolated,
gboolean  inverted 
)
static

◆ default_colorspace()

int default_colorspace ( dt_iop_module_t self,
dt_dev_pixelpipe_t pipe,
dt_dev_pixelpipe_iop_t piece 
)

References IOP_CS_RGB.

◆ default_group()

int default_group ( )

References IOP_GROUP_EFFECTS.

◆ description()

const char ** description ( struct dt_iop_module_t self)

◆ detect_drag()

static gboolean detect_drag ( const dt_iop_liquify_gui_data_t g,
const double  scale,
const float complex  pt 
)
static

References GET_UI_WIDTH.

Referenced by button_released(), and mouse_moved().

◆ distort_backtransform()

int distort_backtransform ( dt_iop_module_t self,
dt_dev_pixelpipe_iop_t piece,
float *const restrict  points,
size_t  points_count 
)

References _distort_xtransform(), and FALSE.

◆ distort_mask()

void distort_mask ( struct dt_iop_module_t self,
struct dt_dev_pixelpipe_iop_t piece,
const float *const  in,
float *const  out,
const dt_iop_roi_t *const  roi_in,
const dt_iop_roi_t *const  roi_out 
)

◆ distort_paths_raw_to_piece()

static void distort_paths_raw_to_piece ( const struct dt_iop_module_t module,
dt_dev_pixelpipe_t pipe,
const float  roi_in_scale,
dt_iop_liquify_params_t p,
const gboolean  from_distort_transform 
)
static

◆ distort_transform()

int distort_transform ( dt_iop_module_t self,
dt_dev_pixelpipe_iop_t piece,
float *const restrict  points,
size_t  points_count 
)

References _distort_xtransform(), and TRUE.

◆ draw_circle()

static void draw_circle ( cairo_t *  cr,
const float complex  pt,
const double  diameter 
)
static

References DT_M_PI.

Referenced by _draw_paths().

◆ draw_paths()

◆ draw_rectangle()

static void draw_rectangle ( cairo_t *  cr,
const float complex  pt,
const double  theta,
const double  size 
)
static

References size.

Referenced by _draw_paths().

◆ draw_triangle()

static void draw_triangle ( cairo_t *  cr,
const float complex  pt,
const double  theta,
const double  size 
)
static

References size.

Referenced by _draw_paths().

◆ dt_conf_get_sanitize_float()

static float dt_conf_get_sanitize_float ( const char *  name,
float  min,
float  max,
float  default_value 
)
static

◆ end_drag()

static void end_drag ( dt_iop_liquify_gui_data_t g)
static

References NOWHERE.

Referenced by button_pressed(), and button_released().

◆ find_hovered()

static dt_liquify_path_data_t * find_hovered ( dt_iop_liquify_params_t p)
static

References DT_LIQUIFY_PATH_INVALIDATED, and MAX_NODES.

Referenced by mouse_moved().

◆ find_nearest_on_curve_t()

static float find_nearest_on_curve_t ( const float complex  p0,
const float complex  p1,
const float complex  p2,
const float complex  p3,
const float complex  x,
const int  n 
)
static

References dist().

Referenced by _hit_paths(), and button_released().

◆ find_nearest_on_line_t()

static float find_nearest_on_line_t ( const float complex  p0,
const float complex  p1,
const float complex  x 
)
static

References cdot().

Referenced by _hit_paths(), and button_released().

◆ flags()

int flags ( )

◆ get_arc_length()

static float get_arc_length ( const float complex  points[],
const int  n_points 
)
static

Referenced by interpolate_paths().

◆ get_point_scale()

◆ get_rot()

static float get_rot ( const dt_liquify_warp_type_enum_t  warp_type)
inlinestatic

◆ get_stamp_params()

◆ get_ui_width()

static float get_ui_width ( const float  scale,
const dt_liquify_ui_width_enum_t  w 
)
static

◆ get_zoom_scale()

static float get_zoom_scale ( dt_develop_t develop)
static

◆ gui_cleanup()

void gui_cleanup ( dt_iop_module_t self)

References IOP_GUI_FREE.

◆ gui_focus()

void gui_focus ( struct dt_iop_module_t module,
gboolean  in 
)

◆ gui_init()

◆ gui_post_expose()

◆ gui_reset()

◆ gui_update()

◆ init()

void init ( dt_iop_module_t module)

◆ init_global()

◆ init_pipe()

◆ init_warp()

◆ interpolate_cubic_bezier()

static void interpolate_cubic_bezier ( const float complex  p0,
const float complex  p1,
const float complex  p2,
const float complex  p3,
float complex  buffer[],
const int  n 
)
static

References A, and B.

Referenced by build_lookup_table(), and interpolate_paths().

◆ interpolate_paths()

◆ is_dragging()

static gboolean is_dragging ( const dt_iop_liquify_gui_data_t g)
static

◆ mix()

static float mix ( const float  a,
const float  b,
const float  t 
)
inlinestatic

◆ mix_warps()

static void mix_warps ( dt_liquify_warp_t result,
const dt_liquify_warp_t warp1,
const dt_liquify_warp_t warp2,
const complex float  pt,
const float  t 
)
static

◆ modify_roi_in()

◆ modify_roi_out()

void modify_roi_out ( struct dt_iop_module_t module,
struct dt_dev_pixelpipe_iop_t piece,
dt_iop_roi_t roi_out,
const dt_iop_roi_t roi_in 
)

◆ mouse_moved()

◆ name()

const char * name ( )

◆ node_alloc()

static dt_liquify_path_data_t * node_alloc ( dt_iop_liquify_params_t p,
int *  node_index 
)
static

◆ node_delete()

◆ node_gc()

static void node_gc ( dt_iop_liquify_params_t p)
static

References DT_LIQUIFY_PATH_INVALIDATED, and MAX_NODES.

Referenced by node_delete(), and path_delete().

◆ node_get()

static dt_liquify_path_data_t * node_get ( dt_iop_liquify_params_t p,
const int  index 
)
static

References MAX_NODES.

Referenced by button_released().

◆ node_insert_before()

static void node_insert_before ( dt_iop_liquify_params_t p,
dt_liquify_path_data_t this,
dt_liquify_path_data_t new 
)
static

Referenced by button_released().

◆ node_next()

◆ node_prev()

◆ normalize()

static float complex normalize ( const float complex  v)
inlinestatic

◆ operation_tags()

int operation_tags ( )

References IOP_TAG_DISTORT.

◆ path_delete()

◆ path_length()

static int path_length ( dt_iop_liquify_params_t p,
dt_liquify_path_data_t n 
)
static

◆ point_at_arc_length()

static float complex point_at_arc_length ( const float complex  points[],
const int  n_points,
const float  arc_length,
restart_cookie_t restart 
)
static

◆ process()

◆ scrolled()

◆ set_line_width()

static void set_line_width ( cairo_t *  cr,
double  scale,
dt_liquify_ui_width_enum_t  w 
)
static

References get_ui_width(), and width.

◆ set_source_rgba()

static void set_source_rgba ( cairo_t *  cr,
dt_liquify_rgba_t  rgba 
)
static

◆ smooth_path_linsys()

static void smooth_path_linsys ( size_t  n,
const float complex *  k,
float complex *  c1,
float complex *  c2,
const int *  equation 
)
static

Smooth a bezier spline through prescribed points.

Smooth a bezier spline through prescribed points by solving a linear system. First we build a tridiagonal matrix and then we solve it using the Thomas algorithm. (FIXME: A tridiagonal matrix is easy to solve in O(n) but you cannot write a closed path as a tridiagonal. To solve closed paths we will have to use a different solver. Use the GSL?)

Here is an article that explains the math: http://www.particleincell.com/blog/2012/bezier-splines/

Basically we find all the ctrl1 points when we solve the linear system, then we calculate each ctrl2 from the ctrl1.

We build the linear system choosing for each segment of the path an equation among following 9 equations. "Straight" is a path that goes straight in to the knot (2nd derivative == 0 at the knot). "Smooth" means a path that goes smoothly through the knot, makes no corner and curves the same amount just before and just after the knot (1st and 2nd derivatives are constant around the knot.) "Keep" means to keep the control point as the user set it.

start end of path
1 straight smooth
2 smooth smooth
3 smooth straight
4 keep smooth
5 keep keep
6 smooth keep
7 keep straight
8 straight straight (yields a line)
9 straight keep

The equations are (close your eyes):

\begin{eqnarray}
               2P_{1,i} + P_{1,i+1} &=&  K_i + 2K_{i+1}  \label{1} \\
   P_{1,i-1} + 4P_{1,i} + P_{1,i+1} &=& 4K_i + 2K_{i+1}  \label{2} \\
  2P_{1,i-1} + 7P_{1,i}             &=& 8K_i +  K_{i+1}  \label{3} \\
                P_{1,i}             &=& C1_i             \label{4} \\
                P_{1,i}             &=& C1_i             \label{5} \\
   P_{1,i-1} + 4P_{1,i}             &=& C2_i + 4K_i      \label{6} \\
                P_{1,i}             &=& C1_i             \label{7} \\
               3P_{1,i}             &=& 2K_i +  K_{i+1}  \label{8} \\
               2P_{1,i}             &=&  K_i +  C2_i     \label{9}
\end{eqnarray}

Some of these are the same and differ only in the way we calculate c2. (You may open your eyes again.)

References ABCD, c1, c2, and m.

Referenced by smooth_paths_linsys().

◆ smooth_paths_linsys()

◆ start_drag()

◆ sync_pipe()

◆ unselect_all()

static void unselect_all ( dt_iop_liquify_params_t p)
static

References DT_LIQUIFY_PATH_INVALIDATED, and MAX_NODES.

Referenced by button_released().

◆ update_warp_count()

static void update_warp_count ( const dt_iop_liquify_gui_data_t g)
static

Variable Documentation

◆ DT_LIQUIFY_COLOR_HOVER

const dt_liquify_rgba_t DT_LIQUIFY_COLOR_HOVER = { 1.0, 1.0, 1.0, 0.8 }
static

Referenced by _draw_paths().

◆ DT_LIQUIFY_COLOR_SELECTED

const dt_liquify_rgba_t DT_LIQUIFY_COLOR_SELECTED = { 1.0, 1.0, 1.0, 1.0 }
static

Referenced by _draw_paths().

◆ dt_liquify_layers

dt_liquify_layer_t dt_liquify_layers[]
Initial value:
=
{
{ DT_LIQUIFY_LAYER_BACKGROUND, { 0.0, 0.0, 0.0, 0.8 } , { 0.0, 0.0, 0.0, 0.8 } , 0.0, 0, },
{ DT_LIQUIFY_LAYER_RADIUS, { 0.9, 0.9, 0.0, 1.0 } , { 0.0, 0.0, 0.0, 0.8 } , 0.25, DT_LIQUIFY_LAYER_FLAG_ANY_TOOL, },
{ DT_LIQUIFY_LAYER_HARDNESS1, { 0.9, 0.9, 0.0, 1.0 } , { 0.0, 0.0, 0.0, 0.8 } , 1.0, 0, },
{ DT_LIQUIFY_LAYER_HARDNESS2, { 0.9, 0.9, 0.0, 1.0 } , { 0.0, 0.0, 0.0, 0.8 } , 1.0, 0, },
{ DT_LIQUIFY_LAYER_WARPS, { 0.9, 0.9, 0.0, 1.0 } , { 0.8, 0.8, 0.8, 1.0 } , 0.5, DT_LIQUIFY_LAYER_FLAG_ANY_TOOL, },
{ DT_LIQUIFY_LAYER_PATH, { 0.3, 0.3, 0.3, 0.8 } , { 0.8, 0.8, 0.8, 1.0 } , 1.0, DT_LIQUIFY_LAYER_FLAG_ANY_TOOL | DT_LIQUIFY_LAYER_FLAG_HIT_TEST, },
{ DT_LIQUIFY_LAYER_CTRLPOINT1, { 0.3, 0.3, 0.3, 0.8 } , { 0.8, 0.8, 0.8, 1.0 } , 1.0, DT_LIQUIFY_LAYER_FLAG_NODE_TOOL, },
{ DT_LIQUIFY_LAYER_CTRLPOINT2, { 0.3, 0.3, 0.3, 0.8 } , { 0.8, 0.8, 0.8, 1.0 } , 1.0, DT_LIQUIFY_LAYER_FLAG_NODE_TOOL, },
{ DT_LIQUIFY_LAYER_RADIUSPOINT, { 0.3, 0.3, 0.3, 0.8 } , { 0.8, 0.8, 0.8, 1.0 } , 1.0, DT_LIQUIFY_LAYER_FLAG_NODE_TOOL, },
{ DT_LIQUIFY_LAYER_HARDNESSPOINT1, { 0.3, 0.3, 0.3, 0.8 } , { 0.8, 0.8, 0.8, 1.0 } , 1.0, DT_LIQUIFY_LAYER_FLAG_NODE_TOOL | DT_LIQUIFY_LAYER_FLAG_NODE_SELECTED, },
{ DT_LIQUIFY_LAYER_HARDNESSPOINT2, { 0.3, 0.3, 0.3, 0.8 } , { 0.8, 0.8, 0.8, 1.0 } , 1.0, DT_LIQUIFY_LAYER_FLAG_NODE_TOOL | DT_LIQUIFY_LAYER_FLAG_NODE_SELECTED, },
{ DT_LIQUIFY_LAYER_STRENGTHPOINT, { 0.3, 0.3, 0.3, 0.8 } , { 0.8, 0.8, 0.8, 1.0 } , 1.0, DT_LIQUIFY_LAYER_FLAG_ANY_TOOL, },
{ DT_LIQUIFY_LAYER_CENTERPOINT, { 0.3, 0.3, 0.3, 0.8 } , { 0.8, 0.8, 0.8, 1.0 } , 1.0, DT_LIQUIFY_LAYER_FLAG_ANY_TOOL | DT_LIQUIFY_LAYER_FLAG_HIT_TEST, },
{ DT_LIQUIFY_LAYER_CTRLPOINT1, { 0.3, 0.3, 0.3, 0.8 } , { 0.8, 0.8, 0.8, 1.0 } , 1.0, DT_LIQUIFY_LAYER_FLAG_NODE_TOOL | DT_LIQUIFY_LAYER_FLAG_HIT_TEST, },
{ DT_LIQUIFY_LAYER_CTRLPOINT2, { 0.3, 0.3, 0.3, 0.8 } , { 0.8, 0.8, 0.8, 1.0 } , 1.0, DT_LIQUIFY_LAYER_FLAG_NODE_TOOL | DT_LIQUIFY_LAYER_FLAG_HIT_TEST, },
{ DT_LIQUIFY_LAYER_RADIUSPOINT, { 0.3, 0.3, 0.3, 0.8 } , { 0.8, 0.8, 0.8, 1.0 } , 1.0, DT_LIQUIFY_LAYER_FLAG_NODE_TOOL | DT_LIQUIFY_LAYER_FLAG_HIT_TEST, },
{ DT_LIQUIFY_LAYER_STRENGTHPOINT, { 0.3, 0.3, 0.3, 0.8 } , { 0.8, 0.8, 0.8, 1.0 } , 1.0, DT_LIQUIFY_LAYER_FLAG_ANY_TOOL | DT_LIQUIFY_LAYER_FLAG_HIT_TEST, }
}
@ DT_LIQUIFY_LAYER_FLAG_HIT_TEST
include layer in hit testing
Definition liquify.c:87
@ DT_LIQUIFY_LAYER_FLAG_ANY_TOOL
Definition liquify.c:94
@ DT_LIQUIFY_LAYER_FLAG_NODE_SELECTED
show if node is selected
Definition liquify.c:89
@ DT_LIQUIFY_LAYER_FLAG_NODE_TOOL
show if node tool active
Definition liquify.c:93
@ DT_LIQUIFY_LAYER_STRENGTHPOINT
Definition liquify.c:81
@ DT_LIQUIFY_LAYER_HARDNESSPOINT1
Definition liquify.c:79
@ DT_LIQUIFY_LAYER_HARDNESSPOINT2
Definition liquify.c:80
@ DT_LIQUIFY_LAYER_CTRLPOINT1
Definition liquify.c:76
@ DT_LIQUIFY_LAYER_PATH
Definition liquify.c:68
@ DT_LIQUIFY_LAYER_HARDNESS2
Definition liquify.c:66
@ DT_LIQUIFY_LAYER_HARDNESS1
Definition liquify.c:65
@ DT_LIQUIFY_LAYER_RADIUSPOINT
Definition liquify.c:78
@ DT_LIQUIFY_LAYER_RADIUS
Definition liquify.c:64
@ DT_LIQUIFY_LAYER_WARPS
Definition liquify.c:67
@ DT_LIQUIFY_LAYER_CTRLPOINT2
Definition liquify.c:77
@ DT_LIQUIFY_LAYER_CENTERPOINT
Definition liquify.c:75
@ DT_LIQUIFY_LAYER_BACKGROUND
Definition liquify.c:63

Referenced by _draw_paths(), _hit_paths(), _hit_test_paths(), draw_paths(), gui_init(), and mouse_moved().

◆ dt_liquify_ui_widths

float dt_liquify_ui_widths[]
Initial value:
=
{
2.0,
3.0,
3.0,
9.0,
7.0,
100.0,
50.0,
3.0
}

Referenced by get_ui_width().

◆ INTERPOLATION_POINTS

const int INTERPOLATION_POINTS = 100

◆ LOOKUP_OVERSAMPLE

const int LOOKUP_OVERSAMPLE = 10

Referenced by build_round_stamp().

◆ NOWHERE

◆ STAMP_RELOCATION

const float STAMP_RELOCATION = 0.1