![]() |
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/mem_alloc.h"#include "common/logging.h"#include "common/module_versioning.h"#include "common/image.h"#include "common/imagebuf.h"#include "pixel/interpolation.h"#include "math/math.h"#include "common/opencl.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/collapsible_section.h"
Include dependency graph for crop.c:Go to the source code of this file.
Data Structures | |
| struct | dt_iop_crop_aspect_t |
| struct | dt_iop_crop_params_t |
| struct | dt_iop_crop_gui_data_t |
| struct | dt_iop_crop_data_t |
Typedefs | |
| typedef enum dt_iop_crop_flip_t | dt_iop_crop_flip_t |
| typedef struct dt_iop_crop_aspect_t | dt_iop_crop_aspect_t |
| typedef struct dt_iop_crop_params_t | dt_iop_crop_params_t |
| typedef enum _grab_region_t | _grab_region_t |
| typedef struct dt_iop_crop_gui_data_t | dt_iop_crop_gui_data_t |
| typedef struct dt_iop_crop_data_t | dt_iop_crop_data_t |
Enumerations | |
| enum | dt_iop_crop_flip_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 | |
| int | legacy_params (dt_iop_module_t *self, const void *const old_params, const int old_version, void *new_params, const int new_version) |
| 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 void | _params_to_gui (dt_iop_crop_params_t *p, dt_iop_crop_gui_data_t *g) |
| static void | _commit_box (dt_iop_module_t *self, dt_iop_crop_gui_data_t *g, dt_iop_crop_params_t *p) |
| static gboolean | _set_max_clip (struct dt_iop_module_t *self) |
| this function initializes the maximum clip rectangle from crop parameters and correct the clip rectangle accordingly in gui. | |
| static void | _crop_resolve (dt_iop_module_t *self, const dt_iop_crop_params_t *const p, dt_iop_crop_data_t *out) |
| Resolve the effective crop rectangle. THE constructor – see the note above. | |
| static void | _crop_map_size (const dt_iop_crop_data_t *const d, const dt_iop_roi_t *const roi_in, dt_iop_roi_t *roi_out) |
| Input rect -> output rect. THE size evaluator. | |
| static void | _crop_offset (const dt_iop_crop_data_t *const d, const dt_iop_roi_t *const roi_in, float *left, float *top) |
| The translation the crop applies, in the input rect's own pixels. | |
| 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) |
| 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) |
| 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) |
| 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) |
| int | process_cl (struct dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece, cl_mem dev_in, cl_mem dev_out) |
| 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 | _crop_geometry_map_size (const void *data, const dt_iop_roi_t *const in, dt_iop_roi_t *out) |
| static int | _crop_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 | _crop_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 (dt_iop_module_t *self, const void *params, dt_geometry_record_t *record) |
| gboolean | runtime_data_hash (struct dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece) |
| 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 | _aspect_ratio_get (dt_iop_module_t *self, GtkWidget *combo) |
| static void | _aspect_apply (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 | _event_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) |
| void | gui_update (struct dt_iop_module_t *self) |
| static void | _event_key_swap (dt_iop_module_t *self) |
| static void | _enter_edit_mode (GtkToggleButton *button, struct dt_iop_module_t *self) |
| static void | _event_commit_clicked (GtkButton *button, dt_iop_module_t *self) |
| static void | _event_aspect_flip (GtkWidget *button, dt_iop_module_t *self) |
| static gint | _aspect_ratio_cmp (const dt_iop_crop_aspect_t *a, const dt_iop_crop_aspect_t *b) |
| static gchar * | _aspect_format (gchar *original, int adim, int bdim) |
| void | gui_init (struct dt_iop_module_t *self) |
| static void | _aspect_free (gpointer data) |
| void | gui_cleanup (struct dt_iop_module_t *self) |
| static _grab_region_t | _gui_get_grab (float pzx, float pzy, dt_iop_crop_gui_data_t *g, const float border, const float wd, const float ht) |
| 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) |
| 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) |
| int | mouse_leave (struct dt_iop_module_t *self) |
Variables | |
| static const dt_geometry_vtable_t | _crop_geometry_vtable |
| typedef enum _grab_region_t _grab_region_t |
| typedef struct dt_iop_crop_aspect_t dt_iop_crop_aspect_t |
| typedef struct dt_iop_crop_data_t dt_iop_crop_data_t |
| typedef enum dt_iop_crop_flip_t dt_iop_crop_flip_t |
flip guides H/V
| typedef struct dt_iop_crop_gui_data_t dt_iop_crop_gui_data_t |
| typedef struct dt_iop_crop_params_t dt_iop_crop_params_t |
| enum _grab_region_t |
| enum dt_iop_crop_flip_t |
|
static |
Definition at line 662 of file crop.c.
References _aspect_ratio_get(), 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_NONE, GRAB_TOP, GRAB_TOP_LEFT, GRAB_TOP_RIGHT, GRAB_VERTICAL, MAX, and MIN.
Referenced by _event_key_swap(), button_pressed(), gui_changed(), gui_post_expose(), and mouse_moved().
|
static |
Definition at line 1207 of file crop.c.
Referenced by gui_init().
|
static |
Definition at line 1405 of file crop.c.
References dt_free, and dt_iop_crop_aspect_t::name.
Referenced by gui_cleanup().
|
static |
|
static |
Definition at line 530 of file crop.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 _aspect_apply(), and gui_update().
|
static |
Definition at line 211 of file crop.c.
References CLAMPF, dt_iop_module_t::dev, dt_dev_distort_backtransform_gui(), dt_dev_module_geometry_gui(), DT_DEV_TRANSFORM_DIR_FORW_EXCL, g, dt_iop_roi_t::height, dt_iop_module_t::iop_order, p, and dt_iop_roi_t::width.
Referenced by gui_changed().
|
static |
Definition at line 473 of file crop.c.
References _crop_offset(), i, dt_geometry_record_t::in, and top.
|
static |
Definition at line 454 of file crop.c.
References _crop_map_size(), and out.
|
static |
Definition at line 459 of file crop.c.
References _crop_offset(), i, dt_geometry_record_t::in, and top.
|
static |
Input rect -> output rect. THE size evaluator.
Definition at line 317 of file crop.c.
References d, dt_iop_roi_t::height, dt_iop_roi_t::width, dt_iop_roi_t::x, and dt_iop_roi_t::y.
Referenced by _crop_geometry_map_size(), and modify_roi_out().
|
static |
The translation the crop applies, in the input rect's own pixels.
Definition at line 335 of file crop.c.
References d, dt_iop_roi_t::height, top, and dt_iop_roi_t::width.
Referenced by _crop_geometry_backtransform(), _crop_geometry_transform(), distort_backtransform(), and distort_transform().
|
static |
Resolve the effective crop rectangle. THE constructor – see the note above.
Definition at line 294 of file crop.c.
References CLAMPF, dt_iop_gui_data(), g, IS_NULL_PTR, out, and p.
Referenced by commit_params(), and geometry_record().
|
static |
Definition at line 1115 of file crop.c.
References _params_to_gui(), dt_iop_module_t::dev, dt_control_change_cursor, dt_control_navigation_redraw(), dt_control_queue_redraw_center(), dt_dev_add_history_item, dt_dev_get_thumbnail_size(), dt_dev_pixelpipe_resync_history_all, dt_iop_gui_data(), dt_iop_request_focus(), dt_iop_set_cache_bypass(), dt_iop_module_t::enabled, FALSE, g, GRAB_CENTER, GRAB_NONE, gui_changed(), p, dt_iop_module_t::params, and TRUE.
Referenced by _event_commit_clicked(), and gui_init().
|
static |
|
static |
Definition at line 855 of file crop.c.
References _float_to_fract(), d, dt_iop_crop_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_gui_freeze_begin, dt_gui_freeze_end, dt_gui_widgets_suppressed(), dt_iop_gui_data(), g, gui_changed(), i, IS_NULL_PTR, MAX, MIN, n, dt_iop_crop_aspect_t::n, dt_iop_crop_aspect_t::name, p, and dt_iop_module_t::params.
Referenced by gui_init(), and gui_update().
|
static |
Definition at line 1160 of file crop.c.
References _enter_edit_mode(), dt_iop_module_t::dev, dt_dev_add_history_item, dt_dev_get_thumbnail_size(), dt_iop_gui_data(), dt_iop_set_cache_bypass(), FALSE, g, and TRUE.
Referenced by gui_init().
|
static |
Definition at line 1107 of file crop.c.
References _aspect_apply(), GRAB_ALL, gui_changed(), p, and dt_iop_module_t::params.
Referenced by _event_aspect_flip().
|
static |
|
static |
Definition at line 1421 of file crop.c.
References g, GRAB_BOTTOM, GRAB_CENTER, GRAB_LEFT, GRAB_NONE, GRAB_RIGHT, and GRAB_TOP.
Referenced by button_pressed(), gui_post_expose(), and mouse_moved().
|
static |
Definition at line 197 of file crop.c.
Referenced by _enter_edit_mode(), and gui_update().
|
static |
this function initializes the maximum clip rectangle from crop parameters and correct the clip rectangle accordingly in gui.
WARNING: this function assumes that the current gui modification are committed to params.
| self | the current module data |
Definition at line 253 of file crop.c.
References 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(), FALSE, g, dt_iop_roi_t::height, dt_iop_module_t::iop_order, p, dt_iop_module_t::params, TRUE, and dt_iop_roi_t::width.
Referenced by gui_post_expose(), and mouse_moved().
| 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 1758 of file crop.c.
References _aspect_apply(), _gui_get_grab(), dt_iop_module_t::dev, dt_dev_coordinates_widget_to_image_norm(), dt_dev_get_overlay_scale(), dt_iop_gui_data(), dt_modifiers_include(), DT_PIXEL_APPLY_DPI, DT_PRIMARY_MASK, g, GRAB_ALL, GRAB_BOTTOM, GRAB_BOTTOM_RIGHT, GRAB_CENTER, GRAB_LEFT, GRAB_NONE, GRAB_RIGHT, GRAB_TOP, state, TRUE, type, and x.
| int button_released | ( | struct dt_iop_module_t * | self, |
| double | x, | ||
| double | y, | ||
| int | which, | ||
| uint32_t | state | ||
| ) |
Definition at line 1739 of file crop.c.
References dt_control_change_cursor, dt_iop_gui_data(), FALSE, g, GRAB_CENTER, and gui_changed().
| void cleanup_pipe | ( | struct dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Definition at line 524 of file crop.c.
References dt_dev_pixelpipe_iop_t::data, and dt_free_align.
| 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 446 of file crop.c.
References _crop_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 192 of file crop.c.
References IOP_CS_RGB.
| int default_group | ( | ) |
Definition at line 170 of file crop.c.
References IOP_GROUP_EFFECTS.
| const char ** description | ( | struct dt_iop_module_t * | self | ) |
Definition at line 163 of file crop.c.
References dt_iop_set_description().
| 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 362 of file crop.c.
References __OMP_PARALLEL_FOR_SIMD__, _crop_offset(), dt_dev_pixelpipe_iop_t::buf_in, d, dt_dev_pixelpipe_iop_t::data, and i.
| 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 | ||
| ) |
| 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 342 of file crop.c.
References __OMP_PARALLEL_FOR_SIMD__, _crop_offset(), dt_dev_pixelpipe_iop_t::buf_in, d, dt_dev_pixelpipe_iop_t::data, and i.
| int flags | ( | ) |
Definition at line 175 of file crop.c.
References IOP_FLAGS_ALLOW_TILING, IOP_FLAGS_GUIDES_SPECIAL_DRAW, IOP_FLAGS_ONE_INSTANCE, and IOP_FLAGS_TILING_FULL_ROI.
| gboolean geometry_record | ( | dt_iop_module_t * | self, |
| const void * | params, | ||
| dt_geometry_record_t * | record | ||
| ) |
Definition at line 493 of file crop.c.
References _crop_geometry_vtable, _crop_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.
| void gui_changed | ( | dt_iop_module_t * | self, |
| GtkWidget * | w, | ||
| void * | previous | ||
| ) |
Definition at line 996 of file crop.c.
References _aspect_apply(), _commit_box(), dt_bauhaus_slider_set(), dt_bauhaus_slider_set_soft_max(), dt_bauhaus_slider_set_soft_min(), dt_control_navigation_redraw(), dt_control_queue_redraw_center(), dt_gui_freeze_begin, dt_gui_freeze_end, dt_iop_gui_data(), g, GRAB_ALL, GRAB_BOTTOM, GRAB_LEFT, GRAB_RIGHT, GRAB_TOP, p, and dt_iop_module_t::params.
Referenced by _enter_edit_mode(), _event_aspect_presets_changed(), _event_key_swap(), button_released(), and mouse_moved().
| void gui_cleanup | ( | struct dt_iop_module_t * | self | ) |
Definition at line 1412 of file crop.c.
References _aspect_free(), dt_iop_gui_data(), g, and IOP_GUI_FREE.
| void gui_init | ( | struct dt_iop_module_t * | self | ) |
Definition at line 1215 of file crop.c.
References _aspect_format(), _aspect_ratio_cmp(), _enter_edit_mode(), _event_aspect_flip(), _event_aspect_presets_changed(), _event_commit_clicked(), d, dt_iop_crop_aspect_t::d, dt_action_button_new(), dt_bauhaus_combobox_add(), 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_bauhaus_widget_set_quad_toggle(), dt_conf_all_string_entries(), dt_conf_string_entry_free(), dt_control_log(), dt_free, DT_GUI_BOX_SPACING, DT_GUI_MODULE, dt_gui_new_collapsible_section(), dtgtk_cairo_paint_aspectflip(), FALSE, g, GRAB_CENTER, dt_iop_module_t::gui, i, IOP_GUI_ALLOC, dt_conf_string_entry_t::key, MAX, MIN, n, dt_iop_crop_aspect_t::n, dt_iop_crop_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 1452 of file crop.c.
References _aspect_apply(), _gui_get_grab(), _set_max_clip(), CLAMPF, dt_iop_module_t::dev, dt_bauhaus_get_global(), dt_control_button_down(), dt_dev_clip_roi(), dt_dev_coordinates_widget_to_image_norm(), dt_dev_get_overlay_scale(), dt_dev_get_processed_size(), dt_dev_rescale_roi(), dt_dev_roi_request_preview_height(), dt_dev_roi_request_preview_width(), dt_draw_set_color_overlay(), dt_gui_draw_rounded_rectangle(), dt_guides_draw(), dt_iop_gui_data(), DT_PIXEL_APPLY_DPI, FALSE, g, GRAB_BOTTOM, GRAB_BOTTOM_LEFT, GRAB_BOTTOM_RIGHT, GRAB_HORIZONTAL, GRAB_LEFT, GRAB_RIGHT, GRAB_TOP, GRAB_TOP_LEFT, GRAB_TOP_RIGHT, height, IS_NULL_PTR, TRUE, and width.
| void gui_reset | ( | struct dt_iop_module_t * | self | ) |
Definition at line 1047 of file crop.c.
References dt_conf_set_int().
| void gui_update | ( | struct dt_iop_module_t * | self | ) |
Definition at line 1054 of file crop.c.
References _aspect_ratio_get(), _event_aspect_presets_changed(), _params_to_gui(), d, dt_iop_crop_aspect_t::d, dt_bauhaus_combobox_get(), dt_bauhaus_combobox_set(), dt_bauhaus_combobox_set_text(), dt_conf_get_int(), dt_gui_update_collapsible_section(), dt_iop_gui_data(), g, i, n, dt_iop_crop_aspect_t::n, p, and dt_iop_module_t::params.
| gboolean has_defaults | ( | struct dt_iop_module_t * | self | ) |
Definition at line 811 of file crop.c.
References d, dt_iop_module_t::default_params, p, and dt_iop_module_t::params.
| void init_pipe | ( | struct dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Definition at line 518 of file crop.c.
References dt_dev_pixelpipe_iop_t::data, dt_dev_pixelpipe_iop_t::data_size, and dt_calloc_align().
| 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 402 of file crop.c.
References dt_dev_pixelpipe_iop_t::buf_in, d, dt_dev_pixelpipe_iop_t::data, dt_iop_roi_t::height, 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 | ||
| ) |
Definition at line 394 of file crop.c.
References _crop_map_size(), and dt_dev_pixelpipe_iop_t::data.
| int mouse_leave | ( | struct dt_iop_module_t * | self | ) |
Definition at line 1833 of file crop.c.
References dt_control_change_cursor, dt_iop_gui_data(), FALSE, g, and GRAB_NONE.
| int mouse_moved | ( | struct dt_iop_module_t * | self, |
| double | x, | ||
| double | y, | ||
| double | pressure, | ||
| int | which | ||
| ) |
Definition at line 1587 of file crop.c.
References _aspect_apply(), _gui_get_grab(), _set_max_clip(), dt_iop_module_t::dev, 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_get_overlay_scale(), dt_iop_gui_data(), DT_PIXEL_APPLY_DPI, g, 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, gui_changed(), and x.
| const char * name | ( | ) |
Definition at line 153 of file crop.c.
Referenced by gui_init().
| int operation_tags | ( | ) |
Definition at line 181 of file crop.c.
References IOP_TAG_CLIPPING, and IOP_TAG_DISTORT.
| int operation_tags_filter | ( | ) |
Definition at line 186 of file crop.c.
References IOP_TAG_DECORATION.
| 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 418 of file crop.c.
References dt_iop_copy_image_roi(), ovoid, dt_dev_pixelpipe_iop_t::roi_in, dt_dev_pixelpipe_iop_t::roi_out, and TRUE.
| int process_cl | ( | struct dt_iop_module_t * | self, |
| const dt_dev_pixelpipe_t * | pipe, | ||
| const dt_dev_pixelpipe_iop_t * | piece, | ||
| cl_mem | dev_in, | ||
| cl_mem | dev_out | ||
| ) |
Definition at line 428 of file crop.c.
References dt_dev_pixelpipe_t::devid, DT_DEBUG_OPENCL, dt_opencl_enqueue_copy_image(), dt_print(), error(), FALSE, dt_iop_roi_t::height, dt_dev_pixelpipe_iop_t::roi_out, TRUE, and dt_iop_roi_t::width.
| void reload_defaults | ( | dt_iop_module_t * | self | ) |
Definition at line 769 of file crop.c.
References d, dt_iop_module_t::default_enabled, dt_iop_module_t::default_params, dt_iop_module_t::dev, DT_IMAGE_AUTO_PRESETS_APPLIED, dt_image_get_effective_orientation(), dt_image_get_usercrop_oriented(), dt_image_t::flags, and dt_develop_t::image_storage.
| gboolean runtime_data_hash | ( | struct dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| const dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
|
static |
Definition at line 487 of file crop.c.
Referenced by geometry_record().