Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
dt_masks_functions_t Struct Reference

#include <masks_functions.h>

+ Collaboration diagram for dt_masks_functions_t:

Data Fields

int point_struct_size
 
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(* set_hint_message )(const struct dt_masks_form_gui_t *const gui, const struct dt_masks_form_t *const form, char *const __restrict__ msgbuf, const size_t msgbuf_len)
 
void(* duplicate_points )(struct dt_develop_t *const dev, struct dt_masks_form_t *base, struct dt_masks_form_t *dest)
 
void(* initial_source_pos )(struct dt_develop_t *dev, const float iwd, const float iht, float *x, float *y)
 
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)
 
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)
 
dt_masks_raster_result_t(* get_points_border )(struct dt_develop_t *dev, struct dt_masks_form_t *form, float **points, int *points_count, float **border, int *border_count, dt_masks_skip_range_t **border_skips, int *border_skip_count, int source, const dt_iop_module_t *const module)
 
dt_masks_raster_result_t(* 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)
 
dt_masks_raster_result_t(* 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, dt_iop_roi_t *touched)
 
dt_masks_raster_result_t(* 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)
 
dt_masks_raster_result_t(* 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)
 
gboolean(* get_gravity_center )(struct dt_develop_t *dev, const struct dt_masks_form_t *form, float center[2], float *area)
 
float(* get_interaction_value )(const struct dt_masks_form_t *form, dt_masks_interaction_t interaction)
 
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(* update_hover )(struct dt_masks_form_t *form, 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)
 
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(* 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(* 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(* 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)
 
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(* init_ctrl_points )(struct dt_masks_form_t *form)
 
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)
 

Detailed Description

structure used to store pointers to the functions implementing operations on a mask shape plus a few per-class descriptive data items

Definition at line 60 of file masks_functions.h.

Field Documentation

◆ button_pressed

int(* dt_masks_functions_t::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)

Definition at line 134 of file masks_functions.h.

Referenced by dt_masks_events_button_pressed().

◆ button_released

int(* dt_masks_functions_t::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)

Definition at line 138 of file masks_functions.h.

Referenced by dt_masks_events_button_released().

◆ draw_shape

◆ duplicate_points

void(* dt_masks_functions_t::duplicate_points) (struct dt_develop_t *const dev, struct dt_masks_form_t *base, struct dt_masks_form_t *dest)

Definition at line 67 of file masks_functions.h.

Referenced by dt_masks_form_duplicate().

◆ get_area

dt_masks_raster_result_t(* dt_masks_functions_t::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)

The shape's bounding box. Same three outcomes; the out-parameters are always written.

Definition at line 111 of file masks_functions.h.

Referenced by _area_and_mask_always_write_their_out_parameters(), and dt_masks_get_area().

◆ get_distance

void(* dt_masks_functions_t::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)

◆ get_gravity_center

gboolean(* dt_masks_functions_t::get_gravity_center) (struct dt_develop_t *dev, const struct dt_masks_form_t *form, float center[2], float *area)

Definition at line 119 of file masks_functions.h.

Referenced by dt_masks_form_get_gravity_center().

◆ get_interaction_value

float(* dt_masks_functions_t::get_interaction_value) (const struct dt_masks_form_t *form, dt_masks_interaction_t interaction)

Definition at line 120 of file masks_functions.h.

Referenced by dt_masks_form_get_interaction_value().

◆ get_mask

dt_masks_raster_result_t(* dt_masks_functions_t::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)

Rasterise into a freshly allocated buffer covering the shape's own bounding box. Same three outcomes as get_mask_roi. On anything but OK the out-parameters are still written (NULL buffer, zero geometry): callers read them unconditionally.

Definition at line 91 of file masks_functions.h.

Referenced by _area_and_mask_always_write_their_out_parameters(), and dt_masks_get_mask().

◆ get_mask_roi

dt_masks_raster_result_t(* dt_masks_functions_t::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, dt_iop_roi_t *touched)

Rasterise into a pre-zeroed ROI-sized buffer.

touched (may be NULL) receives the buffer-relative rectangle enclosing every pixel written – see masks_touched.h.

Returns OK when the buffer was written, EMPTY when the shape has nothing to draw here (degenerate geometry, or wholly outside roi) and the buffer was left untouched, ERROR when the shape could not be computed and the buffer's contents are undefined. EMPTY is NOT a failure: the group fold skips such a shape and keeps folding. Every implementation must agree on which is which – see dt_masks_raster_result_t.

Definition at line 106 of file masks_functions.h.

Referenced by dt_masks_get_mask_roi().

◆ get_points

int(* dt_masks_functions_t::get_points) (struct dt_develop_t *dev, float x, float y, float radius_a, float radius_b, float rotation, float **points, int *points_count)

Definition at line 72 of file masks_functions.h.

Referenced by _circle_get_points_border().

◆ get_points_border

dt_masks_raster_result_t(* dt_masks_functions_t::get_points_border) (struct dt_develop_t *dev, struct dt_masks_form_t *form, float **points, int *points_count, float **border, int *border_count, dt_masks_skip_range_t **border_skips, int *border_skip_count, int source, const dt_iop_module_t *const module)

Build the shape's outline (and, when ‘border’ is given, its border outline).

Returns OK when the outline was built, EMPTY when the shape has no geometry to build one from – an outline that is legitimately empty, which the caller may cache like any other result – and ERROR when the build itself failed and produced nothing cacheable. The distinction is load-bearing: the outline cache key covers the whole group, so caching a FAILURE hides the shape until the geometry next moves, while refusing to cache an legitimately EMPTY one rebuilds every shape of the group on every expose, forever.

Definition at line 83 of file masks_functions.h.

Referenced by dt_masks_get_points_border().

◆ get_source_area

dt_masks_raster_result_t(* dt_masks_functions_t::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)

The clone source's bounding box. Same three outcomes; out-parameters always written.

Definition at line 116 of file masks_functions.h.

Referenced by dt_masks_get_source_area().

◆ init_ctrl_points

void(* dt_masks_functions_t::init_ctrl_points) (struct dt_masks_form_t *form)

initialise all control points to eventually match a catmull-rom like spline

Definition at line 146 of file masks_functions.h.

Referenced by dt_masks_remove_node(), dt_masks_reset_bezier_ctrl_points(), and dt_masks_toggle_bezier_node_type().

◆ initial_source_pos

void(* dt_masks_functions_t::initial_source_pos) (struct dt_develop_t *dev, const float iwd, const float iht, float *x, float *y)

◆ key_pressed

int(* dt_masks_functions_t::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)

Definition at line 141 of file masks_functions.h.

Referenced by dt_masks_events_key_pressed().

◆ mouse_moved

int(* dt_masks_functions_t::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)

Definition at line 127 of file masks_functions.h.

Referenced by _dt_masks_events_mouse_moved().

◆ mouse_scrolled

int(* dt_masks_functions_t::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)

Definition at line 130 of file masks_functions.h.

Referenced by dt_masks_events_mouse_scrolled().

◆ point_struct_size

int dt_masks_functions_t::point_struct_size

◆ populate_context_menu

int(* dt_masks_functions_t::populate_context_menu) (GtkWidget *menu, struct dt_masks_form_t *form, struct dt_masks_form_gui_t *gui, const float pzx, const float pzy)

Definition at line 147 of file masks_functions.h.

Referenced by dt_masks_create_menu().

◆ post_expose

void(* dt_masks_functions_t::post_expose) (cairo_t *cr, float zoom_scale, struct dt_masks_form_gui_t *gui, int index, int num_points)

◆ sanitize_config

void(* dt_masks_functions_t::sanitize_config) (dt_masks_type_t type_flags)

Definition at line 63 of file masks_functions.h.

Referenced by dt_masks_create().

◆ set_form_name

void(* dt_masks_functions_t::set_form_name) (struct dt_masks_form_t *const form, const size_t nb)

Definition at line 64 of file masks_functions.h.

Referenced by dt_masks_gui_form_save_creation().

◆ set_hint_message

void(* dt_masks_functions_t::set_hint_message) (const struct dt_masks_form_gui_t *const gui, const struct dt_masks_form_t *const form, char *const __restrict__ msgbuf, const size_t msgbuf_len)

Definition at line 65 of file masks_functions.h.

Referenced by _set_hinter_message().

◆ set_interaction_value

float(* dt_masks_functions_t::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)

Definition at line 121 of file masks_functions.h.

Referenced by dt_masks_form_set_interaction_value().

◆ update_hover

int(* dt_masks_functions_t::update_hover) (struct dt_masks_form_t *form, struct dt_masks_form_gui_t *gui, int index)

Definition at line 125 of file masks_functions.h.

Referenced by _dt_masks_events_update_hover().


The documentation for this struct was generated from the following file: