47#ifndef DT_DEVELOP_MASKS_MASKS_FUNCTIONS_H
48#define DT_DEVELOP_MASKS_MASKS_FUNCTIONS_H
73 float **points,
int *points_count);
static double dist(double x1, double y1, double x2, double y2)
typedef void((*dt_cache_allocate_t)(void *userdata, dt_cache_entry_t *entry))
struct _GtkWidget GtkWidget
GtkWidget, opaque, spelled exactly as GTK spells it.
void(* shape_draw_function_t)(struct dt_develop_t *dev, cairo_t *cr, const float *points, const int points_count, const int nb, const gboolean border, const gboolean source)
_lib_location_type_t type
dt_masks_form_t * _group_create(dt_develop_t *develop, dt_iop_module_t *module, dt_masks_type_t group_type)
const dt_masks_functions_t dt_masks_functions_group
void _check_id(dt_develop_t *dev, dt_masks_form_t *mask_form)
const dt_masks_functions_t dt_masks_functions_polygon
int _find_in_group(dt_develop_t *dev, dt_masks_form_t *group_form, int form_id)
const dt_masks_functions_t dt_masks_functions_ellipse
const dt_masks_functions_t dt_masks_functions_circle
void _set_group_name_from_module(dt_iop_module_t *module, dt_masks_form_t *group_form)
dt_masks_form_t * _group_from_module(dt_develop_t *develop, dt_iop_module_t *module)
float _change_opacity(dt_masks_form_group_t *form_group, float value, const dt_masks_increment_t increment, const int flow)
const dt_masks_functions_t dt_masks_functions_brush
void dt_masks_form_gui_points_free(gpointer data)
const dt_masks_functions_t dt_masks_functions_gradient
The interactive half of the masks subsystem: the editing state (dt_masks_form_gui_t),...
static const dt_aligned_pixel_simd_t value
const float uint32_t state[4]
Region of interest passed through the pixelpipe.
float(* get_interaction_value)(const struct dt_masks_form_t *form, dt_masks_interaction_t interaction)
int(* button_pressed)(struct dt_iop_module_t *module, double x, double y, double pressure, int which, int type, uint32_t state, struct dt_masks_form_t *form, int parentid, struct dt_masks_form_gui_t *gui, int index)
int(* get_points)(struct dt_develop_t *dev, float x, float y, float radius_a, float radius_b, float rotation, float **points, int *points_count)
void(* initial_source_pos)(struct dt_develop_t *dev, const float iwd, const float iht, float *x, float *y)
int(* button_released)(struct dt_iop_module_t *module, double x, double y, int which, uint32_t state, struct dt_masks_form_t *form, int parentid, struct dt_masks_form_gui_t *gui, int index)
int(* get_mask_roi)(const dt_iop_module_t *const fmodule, struct dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *const piece, struct dt_masks_form_t *const form, const dt_iop_roi_t *roi, float *buffer)
int(* get_source_area)(dt_iop_module_t *module, struct dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece, struct dt_masks_form_t *form, int *width, int *height, int *posx, int *posy)
int(* key_pressed)(struct dt_iop_module_t *module, GdkEventKey *event, struct dt_masks_form_t *form, int parentid, struct dt_masks_form_gui_t *gui, int index)
int(* mouse_moved)(struct dt_iop_module_t *module, double x, double y, double pressure, int which, struct dt_masks_form_t *form, int parentid, struct dt_masks_form_gui_t *gui, int index)
void(* sanitize_config)(dt_masks_type_t type_flags)
void(* set_form_name)(struct dt_masks_form_t *const form, const size_t nb)
void(* duplicate_points)(struct dt_develop_t *const dev, struct dt_masks_form_t *base, struct dt_masks_form_t *dest)
int(* populate_context_menu)(GtkWidget *menu, struct dt_masks_form_t *form, struct dt_masks_form_gui_t *gui, const float pzx, const float pzy)
int(* update_hover)(struct dt_masks_form_t *form, struct dt_masks_form_gui_t *gui, int index)
float(* set_interaction_value)(struct dt_masks_form_t *form, dt_masks_interaction_t interaction, float value, dt_masks_increment_t increment, int flow, struct dt_masks_form_gui_t *gui, struct dt_iop_module_t *module)
int(* get_points_border)(struct dt_develop_t *dev, struct dt_masks_form_t *form, float **points, int *points_count, float **border, int *border_count, int source, const dt_iop_module_t *const module)
int(* get_area)(const dt_iop_module_t *const module, struct dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *const piece, struct dt_masks_form_t *const form, int *width, int *height, int *posx, int *posy)
int(* mouse_scrolled)(struct dt_iop_module_t *module, double x, double y, int up, const int delta_y, uint32_t state, struct dt_masks_form_t *form, int parentid, struct dt_masks_form_gui_t *gui, int index, dt_masks_interaction_t interaction)
int(* get_mask)(const dt_iop_module_t *const module, struct dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *const piece, struct dt_masks_form_t *const form, float **buffer, int *width, int *height, int *posx, int *posy)
gboolean(* get_gravity_center)(struct dt_develop_t *dev, const struct dt_masks_form_t *form, float center[2], float *area)
void(* post_expose)(cairo_t *cr, float zoom_scale, struct dt_masks_form_gui_t *gui, int index, int num_points)
shape_draw_function_t draw_shape
void(* get_distance)(float x, float y, float as, struct dt_masks_form_gui_t *gui, int index, int num_points, int *inside, int *inside_border, int *near_handle, int *inside_source, float *dist)
void(* set_hint_message)(const struct dt_masks_form_gui_t *const gui, const struct dt_masks_form_t *const form, const int opacity, char *const __restrict__ msgbuf, const size_t msgbuf_len)
void(* init_ctrl_points)(struct dt_masks_form_t *form)