![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "widgets/bauhaus.h"#include "widgets/accelerators.h"#include "system/macros.h"#include "system/openmp.h"#include "system/target_clones.h"#include "system/mem_alloc.h"#include "common/module_versioning.h"#include "common/image.h"#include "common/imagebuf.h"#include "pixel/interpolation.h"#include "math/math.h"#include "common/conf.h"#include "control/input.h"#include "control/control.h"#include "develop/develop.h"#include "develop/geometry/geometry.h"#include "develop/imageop.h"#include "develop/imageop_gui.h"#include "widgets/draw.h"#include "gui/guides.h"#include "iop/iop_api.h"#include <assert.h>#include <gdk/gdkkeysyms.h>#include <gtk/gtk.h>#include <inttypes.h>#include <stdlib.h>#include <string.h>#include "widgets/notebook.h"#include "control/signal.h"
Include dependency graph for clipping.c:Go to the source code of this file.
Data Structures | |
| struct | dt_iop_clipping_aspect_t |
| struct | dt_iop_clipping_params_t |
| struct | dt_iop_clipping_gui_data_t |
| struct | dt_iop_clipping_data_t |
Typedefs | |
| typedef enum dt_iop_clipping_flags_t | dt_iop_clipping_flags_t |
| typedef struct dt_iop_clipping_aspect_t | dt_iop_clipping_aspect_t |
| typedef struct dt_iop_clipping_params_t | dt_iop_clipping_params_t |
| typedef enum _grab_region_t | _grab_region_t |
| typedef struct dt_iop_clipping_gui_data_t | dt_iop_clipping_gui_data_t |
| typedef struct dt_iop_clipping_data_t | dt_iop_clipping_data_t |
Enumerations | |
| enum | dt_iop_clipping_flags_t { FLAG_FLIP_HORIZONTAL = 1 << 0 , FLAG_FLIP_VERTICAL = 1 << 1 } |
| enum | _grab_region_t { GRAB_CENTER = 0 , GRAB_LEFT = 1 << 0 , GRAB_TOP = 1 << 1 , GRAB_RIGHT = 1 << 2 , GRAB_BOTTOM = 1 << 3 , GRAB_TOP_LEFT = GRAB_TOP | GRAB_LEFT , GRAB_TOP_RIGHT = GRAB_TOP | GRAB_RIGHT , GRAB_BOTTOM_RIGHT = GRAB_BOTTOM | GRAB_RIGHT , GRAB_BOTTOM_LEFT = GRAB_BOTTOM | GRAB_LEFT , GRAB_HORIZONTAL = GRAB_LEFT | GRAB_RIGHT , GRAB_VERTICAL = GRAB_TOP | GRAB_BOTTOM , GRAB_ALL = GRAB_LEFT | GRAB_TOP | GRAB_RIGHT | GRAB_BOTTOM , GRAB_NONE = 1 << 4 } |
Functions | |
| static void | keystone_type_populate (struct dt_iop_module_t *self, gboolean with_applied, int select) |
| int | legacy_params (dt_iop_module_t *self, const void *const old_params, const int old_version, void *new_params, const int new_version) |
| static void | commit_box (dt_iop_module_t *self, dt_iop_clipping_gui_data_t *g, dt_iop_clipping_params_t *p) |
| static void | get_corner (const float *aabb, const int i, float *p) |
| static void | adjust_aabb (const float *p, float *aabb) |
| const char * | deprecated_msg () |
| const char * | name () |
| const char * | aliases () |
| const char ** | description (struct dt_iop_module_t *self) |
| int | default_group () |
| int | flags () |
| int | operation_tags () |
| int | operation_tags_filter () |
| int | default_colorspace (dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece) |
| static int | gui_has_focus (struct dt_iop_module_t *self) |
| static | __attribute__ ((always_inline)) |
| static void | keystone_backtransform (float *i, const dt_boundingbox_t k_space, float a, float b, float d, float e, float g, float h, float kxa, float kya) |
| static void | keystone_transform (float *i, const dt_boundingbox_t k_space, float a, float b, float d, float e, float g, float h, float kxa, float kya) |
| static void | backtransform (float *x, float *o, const float *m, const float t_h, const float t_v) |
| static void | inv_matrix (float *m, float *inv_m) |
| static void | transform (float *x, float *o, const float *m, const float t_h, const float t_v) |
| static void | _clipping_derive (dt_iop_clipping_data_t *d, const dt_iop_roi_t *const roi_in_orig, dt_iop_roi_t *roi_out) |
| Derive this module's whole geometric state, and the output rect, from the committed parameters and the input dimensions. THE constructor and THE size evaluator at once. | |
| int | distort_transform (dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece, float *const restrict points, size_t points_count) |
| int | distort_backtransform (dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece, float *const restrict points, size_t points_count) |
| void | distort_mask (struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, 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) |
| static int | _iop_clipping_set_max_clip (struct dt_iop_module_t *self) |
| void | modify_roi_out (struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, struct dt_dev_pixelpipe_iop_t *piece, dt_iop_roi_t *roi_out, const dt_iop_roi_t *roi_in_orig) |
| void | modify_roi_in (struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, struct dt_dev_pixelpipe_iop_t *piece, const dt_iop_roi_t *roi_out, dt_iop_roi_t *roi_in) |
| __DT_CLONE_TARGETS__ int | process (struct dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece, const void *const ivoid, void *const ovoid) |
| static void | _clipping_resolve (struct dt_iop_module_t *self, const dt_iop_clipping_params_t *const p, dt_iop_clipping_data_t *d) |
| Parameters -> committed data. THE constructor. | |
| void | commit_params (struct dt_iop_module_t *self, dt_iop_params_t *p1, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece) |
| static void | _event_preview_updated_callback (gpointer instance, dt_iop_module_t *self) |
| void | gui_focus (struct dt_iop_module_t *self, gboolean in) |
| static void | _clipping_geometry_map_size (const void *data, const dt_iop_roi_t *const in, dt_iop_roi_t *out) |
| static void | _clipping_keystone (const dt_iop_clipping_data_t *const d, const float rx, const float ry, dt_boundingbox_t k_space, float *kxa, float *kya, float *ma, float *mb, float *md, float *me, float *mg, float *mh) |
| The keystone matrix and the scaled quadrilateral, which both directions need. | |
| static int | _clipping_geometry_transform (const void *data, const dt_geometry_record_t *const record, dt_geometry_chain_t *chain, float *points, size_t points_count) |
| static int | _clipping_geometry_backtransform (const void *data, const dt_geometry_record_t *const record, dt_geometry_chain_t *chain, float *points, size_t points_count) |
| gboolean | geometry_record (struct dt_iop_module_t *self, const void *params, dt_geometry_record_t *record) |
| void | init_pipe (struct dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece) |
| void | cleanup_pipe (struct dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece) |
| static float | _ratio_get_aspect (dt_iop_module_t *self, GtkWidget *combo) |
| static void | apply_box_aspect (dt_iop_module_t *self, _grab_region_t grab) |
| void | reload_defaults (dt_iop_module_t *self) |
| gboolean | has_defaults (struct dt_iop_module_t *self) |
| static void | _float_to_fract (const char *num, int *n, int *d) |
| static void | aspect_presets_changed (GtkWidget *combo, dt_iop_module_t *self) |
| void | gui_changed (dt_iop_module_t *self, GtkWidget *w, void *previous) |
| void | gui_reset (struct dt_iop_module_t *self) |
| static void | keystone_type_changed (GtkWidget *combo, dt_iop_module_t *self) |
| void | gui_update (struct dt_iop_module_t *self) |
| static void | hvflip_callback (GtkWidget *widget, dt_iop_module_t *self) |
| static void | key_swap_callback (GtkAccelGroup *accel_group, GObject *acceleratable, guint keyval, GdkModifierType modifier, gpointer d) |
| static void | aspect_flip (GtkWidget *button, dt_iop_module_t *self) |
| static gint | _aspect_ratio_cmp (const dt_iop_clipping_aspect_t *a, const dt_iop_clipping_aspect_t *b) |
| static gchar * | format_aspect (gchar *original, int adim, int bdim) |
| void | gui_init (struct dt_iop_module_t *self) |
| static void | free_aspect (gpointer data) |
| void | gui_cleanup (struct dt_iop_module_t *self) |
| static _grab_region_t | get_grab (float pzx, float pzy, dt_iop_clipping_gui_data_t *g, const float border, const float wd, const float ht) |
| static void | gui_draw_sym (cairo_t *cr, float x, float y, float scale, gboolean active) |
| void | gui_post_expose (struct dt_iop_module_t *self, cairo_t *cr, int32_t width, int32_t height, int32_t pointerx, int32_t pointery) |
| static float | dist_seg (float xa, float ya, float xb, float yb, float xc, float yc) |
| int | mouse_moved (struct dt_iop_module_t *self, double x, double y, double pressure, int which) |
| int | button_released (struct dt_iop_module_t *self, double x, double y, int which, uint32_t state) |
| int | button_pressed (struct dt_iop_module_t *self, double x, double y, double pressure, int which, int type, uint32_t state) |
Variables | |
| static const dt_geometry_vtable_t | _clipping_geometry_vtable |
| typedef enum _grab_region_t _grab_region_t |
| typedef struct dt_iop_clipping_aspect_t dt_iop_clipping_aspect_t |
| typedef struct dt_iop_clipping_data_t dt_iop_clipping_data_t |
| typedef enum dt_iop_clipping_flags_t dt_iop_clipping_flags_t |
flip H/V, rotate an image, then clip the buffer.
| typedef struct dt_iop_clipping_gui_data_t dt_iop_clipping_gui_data_t |
| typedef struct dt_iop_clipping_params_t dt_iop_clipping_params_t |
| enum _grab_region_t |
| Enumerator | |
|---|---|
| GRAB_CENTER | |
| GRAB_LEFT | |
| GRAB_TOP | |
| GRAB_RIGHT | |
| GRAB_BOTTOM | |
| GRAB_TOP_LEFT | |
| GRAB_TOP_RIGHT | |
| GRAB_BOTTOM_RIGHT | |
| GRAB_BOTTOM_LEFT | |
| GRAB_HORIZONTAL | |
| GRAB_VERTICAL | |
| GRAB_ALL | |
| GRAB_NONE | |
Definition at line 146 of file clipping.c.
flip H/V, rotate an image, then clip the buffer.
| Enumerator | |
|---|---|
| FLAG_FLIP_HORIZONTAL | |
| FLAG_FLIP_VERTICAL | |
Definition at line 111 of file clipping.c.
|
inlinestatic |
Definition at line 410 of file clipping.c.
|
static |
|
static |
Derive this module's whole geometric state, and the output rect, from the committed parameters and the input dimensions. THE constructor and THE size evaluator at once.
This is modify_roi_out()'s body, unchanged, with the one line that reached into a pipeline piece removed. It was already self-contained – nothing else in those ~190 lines touched ‘piece’, ‘self’ or ‘pipe’ – which is what makes lifting it out safe.
It WRITES into d: the rotation matrix and its inverse, the resolution-corrected keystone factors, the rotation centre, the crop window on the output, the enlargement and the flip are all functions of the input size and cannot be settled until that size is known. Callers who need those fields without planning a ROI – the distort callbacks, and the geometry service's record (develop/geometry/geometry.h) – must therefore run this first. They used to do it by calling modify_roi_out() through the module's own vtable on a SHALLOW COPY of the piece whose ‘data’ pointer still aliased the real one, so the writes landed where they were wanted. Calling this directly says the same thing without the disguise.
Definition at line 746 of file clipping.c.
References d, f, FLAG_FLIP_HORIZONTAL, FLAG_FLIP_VERTICAL, flip, get_corner(), height, dt_iop_roi_t::height, inv_matrix(), k, keystone_transform(), p, transform(), width, dt_iop_roi_t::width, dt_iop_roi_t::x, and dt_iop_roi_t::y.
Referenced by _clipping_geometry_backtransform(), _clipping_geometry_map_size(), _clipping_geometry_transform(), distort_backtransform(), distort_transform(), and modify_roi_out().
|
static |
Definition at line 1414 of file clipping.c.
References _clipping_derive(), _clipping_keystone(), backtransform(), d, dt_iop_roi_t::height, i, dt_geometry_record_t::in, keystone_backtransform(), out, and dt_iop_roi_t::width.
|
static |
Definition at line 1352 of file clipping.c.
References _clipping_derive(), and out.
|
static |
Definition at line 1375 of file clipping.c.
References _clipping_derive(), _clipping_keystone(), d, dt_iop_roi_t::height, i, dt_geometry_record_t::in, keystone_transform(), out, transform(), and dt_iop_roi_t::width.
|
static |
The keystone matrix and the scaled quadrilateral, which both directions need.
Definition at line 1359 of file clipping.c.
References d.
Referenced by _clipping_geometry_backtransform(), and _clipping_geometry_transform().
|
static |
Parameters -> committed data. THE constructor.
commit_params()'s body, unchanged, minus the two lines that fetched the parameters and the piece. Like _clipping_derive() below it was already self-contained, and the geometry record needs it for the same reason: it has parameters and no pipeline piece to put them in.
It reads ONE thing that is not a parameter: gui_has_focus(), which neutralises the crop while this module is the focused one so the darkroom shows the whole frame to drag the crop over. That is GUI state and never reaches history, which is why a record cannot be built from history alone and why this takes self.
Note what this does NOT settle – everything that depends on the input size (the matrices, the keystone factors corrected by resolution, the rotation centre, the crop on the output). That is _clipping_derive()'s job, and it has to run afterwards.
Definition at line 1105 of file clipping.c.
References CLAMPF, d, dt_iop_module_t::dev, FLAG_FLIP_HORIZONTAL, FLAG_FLIP_VERTICAL, gui_has_focus(), dt_image_t::id, dt_develop_t::image_storage, M_PI, and p.
Referenced by commit_params(), and geometry_record().
|
static |
Definition at line 1277 of file clipping.c.
References _event_preview_updated_callback(), dt_control_signal_get_global(), DT_DEBUG_CONTROL_SIGNAL_DISCONNECT, dt_iop_gui_data(), DT_PIXELPIPE_CACHE_HASH_INVALID, g, and TRUE.
Referenced by _event_preview_updated_callback(), and gui_focus().
|
static |
Definition at line 1751 of file clipping.c.
References d, FALSE, k, n, p, and TRUE.
Referenced by aspect_presets_changed().
|
static |
Definition at line 693 of file clipping.c.
References ch, CLAMPF, dt_iop_module_t::dev, dt_dev_coordinates_preview_abs_to_image_norm(), dt_dev_distort_transform_gui(), dt_dev_module_geometry_gui(), DT_DEV_TRANSFORM_DIR_FORW_EXCL, dt_iop_gui_data(), g, dt_iop_roi_t::height, dt_iop_module_t::iop_order, p, dt_iop_module_t::params, and dt_iop_roi_t::width.
Referenced by gui_post_expose(), and mouse_moved().
|
static |
Definition at line 1486 of file clipping.c.
References d, dt_iop_module_t::dev, dt_bauhaus_combobox_get_text(), dt_dev_get_processed_size(), dt_dev_module_geometry_gui(), dt_interpolation_new(), DT_INTERPOLATION_USERPREF_WARP, dt_iop_roi_t::height, MAX, MIN, n, p, dt_iop_module_t::params, PHI, dt_iop_roi_t::width, and dt_interpolation::width.
Referenced by apply_box_aspect(), and gui_update().
|
inlinestatic |
| const char * aliases | ( | ) |
Definition at line 364 of file clipping.c.
|
static |
Definition at line 1618 of file clipping.c.
References _ratio_get_aspect(), dt_iop_module_t::dev, double(), dt_dev_get_processed_size(), dt_iop_gui_data(), g, GRAB_BOTTOM_LEFT, GRAB_BOTTOM_RIGHT, GRAB_HORIZONTAL, GRAB_LEFT, GRAB_TOP, GRAB_TOP_LEFT, GRAB_TOP_RIGHT, GRAB_VERTICAL, MAX, and MIN.
Referenced by aspect_presets_changed(), gui_post_expose(), key_swap_callback(), and mouse_moved().
|
static |
Definition at line 2142 of file clipping.c.
References key_swap_callback().
Referenced by gui_init().
|
static |
Definition at line 1787 of file clipping.c.
References _float_to_fract(), apply_box_aspect(), d, dt_iop_clipping_aspect_t::d, dt_bauhaus_combobox_get(), dt_bauhaus_combobox_get_text(), dt_bauhaus_combobox_set(), dt_bauhaus_combobox_set_text(), dt_conf_set_int(), dt_control_log(), dt_control_queue_redraw_center(), dt_gui_freeze_begin, dt_gui_freeze_end, dt_gui_widgets_suppressed(), dt_iop_gui_data(), g, GRAB_HORIZONTAL, i, IS_NULL_PTR, MAX, MIN, n, dt_iop_clipping_aspect_t::n, dt_iop_clipping_aspect_t::name, p, and dt_iop_module_t::params.
Referenced by gui_init(), and gui_update().
|
inlinestatic |
Definition at line 469 of file clipping.c.
References m, mul_mat_vec_2(), and x.
Referenced by _clipping_geometry_backtransform(), distort_backtransform(), distort_mask(), modify_roi_in(), and process().
| int button_pressed | ( | struct dt_iop_module_t * | self, |
| double | x, | ||
| double | y, | ||
| double | pressure, | ||
| int | which, | ||
| int | type, | ||
| uint32_t | state | ||
| ) |
Definition at line 3277 of file clipping.c.
References commit_box(), dt_iop_module_t::dev, dt_dev_add_history_item, dt_dev_coordinates_image_norm_to_preview_abs(), dt_dev_coordinates_widget_to_image_norm(), dt_dev_distort_transform_gui(), dt_dev_module_geometry_gui(), DT_DEV_TRANSFORM_DIR_FORW_EXCL, dt_dev_viewport_scaling(), dt_iop_gui_data(), dt_iop_request_focus(), dt_modifiers_include(), DT_PIXEL_APPLY_DPI, DT_PRIMARY_MASK, FALSE, g, dt_iop_roi_t::height, dt_iop_module_t::iop_order, keystone_type_populate(), MAX, MIN, p, dt_iop_module_t::params, state, TRUE, type, dt_iop_roi_t::width, and x.
| int button_released | ( | struct dt_iop_module_t * | self, |
| double | x, | ||
| double | y, | ||
| int | which, | ||
| uint32_t | state | ||
| ) |
Definition at line 3231 of file clipping.c.
References dt_iop_module_t::dev, dt_bauhaus_slider_set(), dt_control_queue_cursor, dt_dev_distort_backtransform_gui(), DT_DEV_TRANSFORM_DIR_FORW_INCL, dt_iop_gui_data(), FALSE, g, dt_iop_module_t::iop_order, M_PI, and x.
| void cleanup_pipe | ( | struct dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Definition at line 1480 of file clipping.c.
References dt_dev_pixelpipe_iop_t::data, and dt_free_align.
|
static |
Definition at line 3196 of file clipping.c.
References CLAMPF, dt_iop_module_t::dev, dt_dev_add_history_item, dt_dev_distort_backtransform_gui(), dt_dev_module_geometry_gui(), dt_dev_roi_request_preview_height(), dt_dev_roi_request_preview_width(), DT_DEV_TRANSFORM_DIR_FORW_EXCL, dt_gui_widgets_suppressed(), dt_iop_module_t::enabled, eps, g, dt_iop_roi_t::height, dt_iop_module_t::iop_order, p, TRUE, and dt_iop_roi_t::width.
Referenced by button_pressed(), gui_changed(), gui_focus(), hvflip_callback(), and keystone_type_changed().
| void commit_params | ( | struct dt_iop_module_t * | self, |
| dt_iop_params_t * | p1, | ||
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Definition at line 1271 of file clipping.c.
References _clipping_resolve(), and dt_dev_pixelpipe_iop_t::data.
| int default_colorspace | ( | dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| const dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Definition at line 400 of file clipping.c.
References IOP_CS_RGB.
| int default_group | ( | ) |
Definition at line 378 of file clipping.c.
References IOP_GROUP_EFFECTS.
| const char * deprecated_msg | ( | ) |
Definition at line 354 of file clipping.c.
| const char ** description | ( | struct dt_iop_module_t * | self | ) |
Definition at line 369 of file clipping.c.
References dt_iop_set_description().
|
static |
Definition at line 2814 of file clipping.c.
Referenced by mouse_moved().
| int distort_backtransform | ( | dt_iop_module_t * | self, |
| const dt_dev_pixelpipe_t * | pipe, | ||
| const dt_dev_pixelpipe_iop_t * | piece, | ||
| float *const restrict | points, | ||
| size_t | points_count | ||
| ) |
Definition at line 563 of file clipping.c.
References __OMP_PARALLEL_FOR_SIMD__, _clipping_derive(), backtransform(), dt_dev_pixelpipe_iop_t::buf_in, d, dt_dev_pixelpipe_iop_t::data, dt_iop_module_t::dev, dt_dev_pixelpipe_has_preview_output(), factor, dt_iop_roi_t::height, i, keystone_backtransform(), and dt_iop_roi_t::width.
| void distort_mask | ( | struct dt_iop_module_t * | self, |
| const struct dt_dev_pixelpipe_t * | pipe, | ||
| 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 | ||
| ) |
Definition at line 628 of file clipping.c.
References __OMP_PARALLEL_FOR__, backtransform(), dt_dev_pixelpipe_iop_t::buf_in, d, dt_dev_pixelpipe_iop_t::data, dt_interpolation_compute_sample(), dt_interpolation_new(), DT_INTERPOLATION_USERPREF_WARP, dt_iop_image_copy_by_size(), dt_iop_roi_t::height, i, keystone_backtransform(), out, dt_iop_roi_t::scale, void(), dt_iop_roi_t::width, dt_iop_roi_t::x, and dt_iop_roi_t::y.
| int distort_transform | ( | dt_iop_module_t * | self, |
| const dt_dev_pixelpipe_t * | pipe, | ||
| const dt_dev_pixelpipe_iop_t * | piece, | ||
| float *const restrict | points, | ||
| size_t | points_count | ||
| ) |
Definition at line 499 of file clipping.c.
References __OMP_PARALLEL_FOR__, _clipping_derive(), dt_dev_pixelpipe_iop_t::buf_in, d, dt_dev_pixelpipe_iop_t::data, dt_iop_module_t::dev, dt_dev_pixelpipe_has_preview_output(), factor, dt_iop_roi_t::height, i, keystone_transform(), transform(), and dt_iop_roi_t::width.
| int flags | ( | ) |
Definition at line 383 of file clipping.c.
References IOP_FLAGS_ALLOW_TILING, IOP_FLAGS_DEPRECATED, IOP_FLAGS_ONE_INSTANCE, and IOP_FLAGS_TILING_FULL_ROI.
|
static |
Definition at line 2169 of file clipping.c.
Referenced by gui_init().
|
static |
Definition at line 2375 of file clipping.c.
References dt_free, and dt_iop_clipping_aspect_t::name.
Referenced by gui_cleanup().
| gboolean geometry_record | ( | struct dt_iop_module_t * | self, |
| const void * | params, | ||
| dt_geometry_record_t * | record | ||
| ) |
Definition at line 1461 of file clipping.c.
References _clipping_geometry_vtable, _clipping_resolve(), dt_geometry_record_t::data, dt_free_gpointer(), FALSE, dt_geometry_record_t::free_data, IS_NULL_PTR, TRUE, and dt_geometry_record_t::vtable.
|
inlinestatic |
Definition at line 341 of file clipping.c.
Referenced by _clipping_derive(), and modify_roi_in().
|
static |
Definition at line 2391 of file clipping.c.
References g, GRAB_BOTTOM, GRAB_CENTER, GRAB_LEFT, GRAB_NONE, GRAB_RIGHT, and GRAB_TOP.
Referenced by gui_post_expose(), and mouse_moved().
| void gui_changed | ( | dt_iop_module_t * | self, |
| GtkWidget * | w, | ||
| void * | previous | ||
| ) |
Definition at line 1923 of file clipping.c.
References commit_box(), dt_bauhaus_slider_set_soft_max(), dt_bauhaus_slider_set_soft_min(), dt_control_queue_redraw_center(), dt_gui_freeze_begin, dt_gui_freeze_end, dt_iop_gui_data(), g, p, and dt_iop_module_t::params.
| void gui_cleanup | ( | struct dt_iop_module_t * | self | ) |
Definition at line 2382 of file clipping.c.
References dt_iop_gui_data(), free_aspect(), g, and IOP_GUI_FREE.
|
static |
Definition at line 2410 of file clipping.c.
References dt_bauhaus_get_global(), dt_draw_set_color_overlay(), dt_gui_draw_rounded_rectangle(), DT_PIXEL_APPLY_DPI, TRUE, and x.
Referenced by gui_post_expose().
| void gui_focus | ( | struct dt_iop_module_t * | self, |
| gboolean | in | ||
| ) |
Definition at line 1286 of file clipping.c.
References _event_preview_updated_callback(), CLAMPF, commit_box(), dt_iop_module_t::dev, dt_control_signal_get_global(), DT_DEBUG_CONTROL_SIGNAL_CONNECT, dt_dev_get_thumbnail_size(), dt_dev_pixelpipe_resync_history_all, dt_iop_gui_data(), dt_iop_set_cache_bypass(), DT_PIXELPIPE_CACHE_HASH_INVALID, DT_SIGNAL_DEVELOP_PREVIEW_PIPE_FINISHED, dt_iop_module_t::enabled, FALSE, g, dt_develop_t::gui_module, keystone_type_populate(), p, dt_iop_module_t::params, and TRUE.
|
static |
Definition at line 405 of file clipping.c.
References dt_iop_module_t::dev, and dt_develop_t::gui_module.
Referenced by _clipping_resolve().
| void gui_init | ( | struct dt_iop_module_t * | self | ) |
Definition at line 2177 of file clipping.c.
References _aspect_ratio_cmp(), aspect_flip(), aspect_presets_changed(), d, dt_iop_clipping_aspect_t::d, dt_bauhaus_combobox_add(), dt_bauhaus_combobox_from_params(), dt_bauhaus_combobox_new(), dt_bauhaus_combobox_set(), dt_bauhaus_combobox_set_editable(), dt_bauhaus_get_global(), dt_bauhaus_slider_from_params(), dt_bauhaus_slider_set_digits(), dt_bauhaus_slider_set_factor(), dt_bauhaus_slider_set_format(), dt_bauhaus_slider_set_offset(), dt_bauhaus_widget_set_label(), dt_bauhaus_widget_set_quad_paint(), dt_conf_all_string_entries(), dt_conf_string_entry_free(), dt_control_log(), dt_free, DT_GUI_MODULE, DT_PIXELPIPE_CACHE_HASH_INVALID, dt_ui_notebook_new(), dt_ui_notebook_page(), dtgtk_cairo_paint_aspectflip(), FALSE, format_aspect(), g, dt_iop_module_t::gui, hvflip_callback(), i, IOP_GUI_ALLOC, dt_conf_string_entry_t::key, keystone_type_changed(), MAX, MIN, n, dt_iop_clipping_aspect_t::n, dt_iop_clipping_aspect_t::name, name(), TRUE, dt_conf_string_entry_t::value, and dt_iop_module_gui_t::widget.
| void gui_post_expose | ( | struct dt_iop_module_t * | self, |
| cairo_t * | cr, | ||
| int32_t | width, | ||
| int32_t | height, | ||
| int32_t | pointerx, | ||
| int32_t | pointery | ||
| ) |
Definition at line 2436 of file clipping.c.
References _iop_clipping_set_max_clip(), apply_box_aspect(), CLAMPF, dt_iop_module_t::dev, dt_bauhaus_get_global(), dt_control_button_down(), dt_dev_coordinates_widget_to_image_norm(), dt_dev_distort_transform_gui(), dt_dev_get_overlay_scale(), dt_dev_get_processed_size(), dt_dev_module_geometry_gui(), dt_dev_roi_request_preview_height(), dt_dev_roi_request_preview_width(), DT_DEV_TRANSFORM_DIR_FORW_EXCL, dt_draw_set_color_overlay(), dt_gui_draw_rounded_rectangle(), dt_guides_draw(), dt_iop_gui_data(), DT_PIXEL_APPLY_DPI, FALSE, g, get_grab(), GRAB_BOTTOM, GRAB_BOTTOM_LEFT, GRAB_BOTTOM_RIGHT, GRAB_HORIZONTAL, GRAB_LEFT, GRAB_RIGHT, GRAB_TOP, GRAB_TOP_LEFT, GRAB_TOP_RIGHT, gui_draw_sym(), height, dt_iop_roi_t::height, dt_iop_module_t::iop_order, IS_NULL_PTR, M_PI, MAX, MIN, p, dt_iop_module_t::params, TRUE, width, and dt_iop_roi_t::width.
| void gui_reset | ( | struct dt_iop_module_t * | self | ) |
Definition at line 1960 of file clipping.c.
References dt_conf_set_int(), dt_iop_gui_data(), and g.
| void gui_update | ( | struct dt_iop_module_t * | self | ) |
Definition at line 2033 of file clipping.c.
References _ratio_get_aspect(), aspect_presets_changed(), CLAMPF, d, dt_iop_clipping_aspect_t::d, dt_bauhaus_combobox_get(), dt_bauhaus_combobox_set(), dt_bauhaus_combobox_set_text(), dt_conf_get_int(), dt_iop_gui_data(), FALSE, g, i, keystone_type_populate(), n, dt_iop_clipping_aspect_t::n, p, dt_iop_module_t::params, and TRUE.
| gboolean has_defaults | ( | struct dt_iop_module_t * | self | ) |
Definition at line 1743 of file clipping.c.
References d, dt_iop_module_t::default_params, p, and dt_iop_module_t::params.
|
static |
Definition at line 2117 of file clipping.c.
References commit_box(), dt_bauhaus_combobox_get(), dt_gui_widgets_suppressed(), dt_iop_gui_data(), flip, g, p, and dt_iop_module_t::params.
Referenced by gui_init().
| void init_pipe | ( | struct dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Definition at line 1474 of file clipping.c.
References dt_dev_pixelpipe_iop_t::data, dt_dev_pixelpipe_iop_t::data_size, and dt_calloc_align().
|
inlinestatic |
|
static |
Definition at line 2128 of file clipping.c.
References apply_box_aspect(), d, dt_control_queue_redraw_center(), GRAB_HORIZONTAL, p, dt_iop_module_t::params, and void().
Referenced by aspect_flip().
|
inlinestatic |
Definition at line 444 of file clipping.c.
Referenced by _clipping_geometry_backtransform(), distort_backtransform(), distort_mask(), modify_roi_in(), and process().
|
inlinestatic |
Definition at line 457 of file clipping.c.
Referenced by _clipping_derive(), _clipping_geometry_transform(), and distort_transform().
|
static |
Definition at line 1969 of file clipping.c.
References commit_box(), dt_bauhaus_combobox_get(), dt_control_queue_redraw_center(), dt_iop_gui_data(), FALSE, g, keystone_type_populate(), p, dt_iop_module_t::params, and TRUE.
Referenced by gui_init(), and keystone_type_populate().
|
static |
Definition at line 2007 of file clipping.c.
References dt_bauhaus_combobox_add(), dt_bauhaus_combobox_clear(), dt_bauhaus_combobox_set(), dt_iop_gui_data(), g, keystone_type_changed(), p, and dt_iop_module_t::params.
Referenced by button_pressed(), gui_focus(), gui_update(), and keystone_type_changed().
| int legacy_params | ( | dt_iop_module_t * | self, |
| const void *const | old_params, | ||
| const int | old_version, | ||
| void * | new_params, | ||
| const int | new_version | ||
| ) |
| void modify_roi_in | ( | struct dt_iop_module_t * | self, |
| const struct dt_dev_pixelpipe_t * | pipe, | ||
| struct dt_dev_pixelpipe_iop_t * | piece, | ||
| const dt_iop_roi_t * | roi_out, | ||
| dt_iop_roi_t * | roi_in | ||
| ) |
Definition at line 939 of file clipping.c.
References adjust_aabb(), backtransform(), dt_dev_pixelpipe_iop_t::buf_in, d, dt_dev_pixelpipe_iop_t::data, get_corner(), dt_iop_roi_t::height, keystone_backtransform(), p, dt_iop_roi_t::scale, dt_iop_roi_t::width, dt_iop_roi_t::x, and dt_iop_roi_t::y.
| void modify_roi_out | ( | struct dt_iop_module_t * | self, |
| const struct dt_dev_pixelpipe_t * | pipe, | ||
| struct dt_dev_pixelpipe_iop_t * | piece, | ||
| dt_iop_roi_t * | roi_out, | ||
| const dt_iop_roi_t * | roi_in_orig | ||
| ) |
Definition at line 931 of file clipping.c.
References _clipping_derive(), and dt_dev_pixelpipe_iop_t::data.
| int mouse_moved | ( | struct dt_iop_module_t * | self, |
| double | x, | ||
| double | y, | ||
| double | pressure, | ||
| int | which | ||
| ) |
Definition at line 2835 of file clipping.c.
References _iop_clipping_set_max_clip(), apply_box_aspect(), dt_iop_module_t::dev, dist_seg(), dt_bauhaus_slider_set(), dt_bauhaus_slider_set_soft_max(), dt_bauhaus_slider_set_soft_min(), dt_control_button_down(), dt_control_get_global(), dt_control_hinter_message(), dt_control_queue_cursor, dt_control_queue_redraw_center(), dt_dev_coordinates_widget_to_image_norm(), dt_dev_distort_backtransform_gui(), dt_dev_module_geometry_gui(), dt_dev_roi_request_preview_height(), dt_dev_roi_request_preview_width(), DT_DEV_TRANSFORM_DIR_FORW_EXCL, dt_dev_viewport_scaling(), dt_gui_freeze_begin, dt_gui_freeze_end, dt_iop_gui_data(), DT_PIXEL_APPLY_DPI, FALSE, g, get_grab(), GRAB_ALL, GRAB_BOTTOM, GRAB_BOTTOM_LEFT, GRAB_BOTTOM_RIGHT, GRAB_CENTER, GRAB_LEFT, GRAB_NONE, GRAB_RIGHT, GRAB_TOP, GRAB_TOP_LEFT, GRAB_TOP_RIGHT, dt_iop_roi_t::height, dt_iop_module_t::iop_order, p, dt_iop_module_t::params, TRUE, dt_iop_roi_t::width, and x.
| const char * name | ( | ) |
Definition at line 359 of file clipping.c.
Referenced by gui_init().
| int operation_tags | ( | ) |
Definition at line 389 of file clipping.c.
References IOP_TAG_CLIPPING, and IOP_TAG_DISTORT.
| int operation_tags_filter | ( | ) |
Definition at line 394 of file clipping.c.
References IOP_TAG_CLIPPING, and IOP_TAG_DECORATION.
| __DT_CLONE_TARGETS__ int process | ( | struct dt_iop_module_t * | self, |
| const dt_dev_pixelpipe_t * | pipe, | ||
| const dt_dev_pixelpipe_iop_t * | piece, | ||
| const void *const | ivoid, | ||
| void *const | ovoid | ||
| ) |
Definition at line 1016 of file clipping.c.
References __OMP_PARALLEL_FOR__, backtransform(), dt_dev_pixelpipe_iop_t::buf_in, ch, d, dt_dev_pixelpipe_iop_t::data, dt_interpolation_compute_pixel4c(), dt_interpolation_new(), DT_INTERPOLATION_USERPREF_WARP, dt_iop_image_copy_by_size(), dt_iop_roi_t::height, i, keystone_backtransform(), out, ovoid, dt_dev_pixelpipe_iop_t::roi_in, dt_dev_pixelpipe_iop_t::roi_out, dt_iop_roi_t::scale, dt_iop_roi_t::width, dt_iop_roi_t::x, and dt_iop_roi_t::y.
| void reload_defaults | ( | dt_iop_module_t * | self | ) |
Definition at line 1725 of file clipping.c.
References d, dt_iop_module_t::default_params, dt_iop_module_t::dev, dt_image_get_effective_orientation(), dt_image_get_usercrop_oriented(), and dt_develop_t::image_storage.
|
inlinestatic |
Definition at line 487 of file clipping.c.
References m, mul_mat_vec_2(), and x.
Referenced by _check_hidpi_placement(), _clipping_derive(), _clipping_geometry_transform(), _overlay_apply_transform(), _overlay_dump_skips(), _overlay_frame(), _overlay_leftovers(), _overlay_report(), _srgb_to_display_row(), _time_overlay_form(), _transform_rgba8_to_bgra8(), distort_transform(), dt_colorprofiles_bgra8_to_adobergb_rgba8(), dt_colorprofiles_rgba8_to_display_bgra8(), dt_colorprofiles_srgb_to_display_strided(), dt_colorprofiles_xyz_to_display(), dt_colorspaces_transform_rgba_float_image(), dt_colorspaces_transform_rgba_float_row(), dt_control_flip_images(), dt_control_flip_images_job_run(), dt_image_flip(), dt_masks_debug_write_png(), dt_masks_events_post_expose_with(), process(), and process_cl().
|
static |
Definition at line 1455 of file clipping.c.
Referenced by geometry_record().