![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "bauhaus/bauhaus.h"
#include "common/debug.h"
#include "common/imagebuf.h"
#include "common/interpolation.h"
#include "common/math.h"
#include "common/opencl.h"
#include "control/conf.h"
#include "control/control.h"
#include "develop/develop.h"
#include "develop/imageop.h"
#include "develop/imageop_gui.h"
#include "develop/tiling.h"
#include "gui/draw.h"
#include "gui/gtk.h"
#include "gui/guides.h"
#include "gui/presets.h"
#include "iop/iop_api.h"
#include "libs/modulegroups.h"
#include <assert.h>
#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>
#include <inttypes.h>
#include <stdlib.h>
#include <string.h>
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 |
struct | dt_iop_clipping_global_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 |
typedef struct dt_iop_clipping_global_data_t | dt_iop_clipping_global_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, dt_dev_pixelpipe_iop_t *piece) |
static int | gui_has_focus (struct dt_iop_module_t *self) |
static void | keystone_get_matrix (const dt_boundingbox_t k_space, float kxa, float kxb, float kxc, float kxd, float kya, float kyb, float kyc, float kyd, float *a, float *b, float *d, float *e, float *g, float *h) |
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) |
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) |
static int | _iop_clipping_set_max_clip (struct dt_iop_module_t *self) |
void | modify_roi_out (struct dt_iop_module_t *self, 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, struct dt_dev_pixelpipe_iop_t *piece, const dt_iop_roi_t *roi_out, dt_iop_roi_t *roi_in) |
void | process (struct dt_iop_module_t *self, dt_dev_pixelpipe_iop_t *piece, const void *const ivoid, void *const ovoid, 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 | 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) |
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) |
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_global_data_t dt_iop_clipping_global_data_t |
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 |
|
static |
References dt_iop_clipping_aspect_t::d, MAX, MIN, and dt_iop_clipping_aspect_t::n.
Referenced by gui_init().
|
static |
References _event_preview_updated_callback(), darktable, DT_DEBUG_CONTROL_SIGNAL_DISCONNECT, dt_iop_module_t::gui_data, darktable_t::signals, and TRUE.
Referenced by _event_preview_updated_callback(), and gui_focus().
|
static |
Referenced by aspect_presets_changed().
|
static |
References dt_dev_pixelpipe_t::backbuf_hash, dt_dev_pixelpipe_t::backbuf_height, dt_dev_pixelpipe_t::backbuf_width, dt_dev_pixelpipe_iop_t::buf_out, CLAMPF, dt_iop_module_t::dev, dt_dev_distort_get_iop_pipe(), dt_dev_distort_transform_plus(), DT_DEV_TRANSFORM_DIR_FORW_EXCL, dt_iop_module_t::gui_data, dt_iop_roi_t::height, dt_iop_module_t::iop_order, dt_iop_module_t::params, dt_develop_t::preview_pipe, and dt_iop_roi_t::width.
Referenced by gui_post_expose(), and mouse_moved().
|
static |
References dt_dev_pixelpipe_iop_t::buf_in, darktable, dt_iop_module_t::dev, darktable_t::develop, dt_bauhaus_combobox_get_text(), dt_dev_distort_get_iop_pipe(), dt_dev_get_processed_size(), dt_interpolation_new(), DT_INTERPOLATION_USERPREF_WARP, dt_iop_roi_t::height, MAX, MIN, dt_iop_module_t::params, PHI, dt_develop_t::preview_pipe, dt_interpolation::width, and dt_iop_roi_t::width.
Referenced by apply_box_aspect(), and gui_update().
|
inlinestatic |
Referenced by modify_roi_in().
const char * aliases | ( | ) |
|
static |
References _ratio_get_aspect(), darktable, darktable_t::develop, double(), dt_dev_get_processed_size(), GRAB_BOTTOM_LEFT, GRAB_BOTTOM_RIGHT, GRAB_HORIZONTAL, GRAB_LEFT, GRAB_TOP, GRAB_TOP_LEFT, GRAB_TOP_RIGHT, GRAB_VERTICAL, dt_iop_module_t::gui_data, MAX, and MIN.
Referenced by aspect_presets_changed(), gui_post_expose(), key_swap_callback(), and mouse_moved().
|
static |
References key_swap_callback().
Referenced by gui_init().
|
static |
References _float_to_fract(), apply_box_aspect(), dt_iop_clipping_aspect_t::d, darktable, 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(), GRAB_HORIZONTAL, darktable_t::gui, dt_iop_module_t::gui_data, MAX, MIN, dt_iop_clipping_aspect_t::n, dt_iop_clipping_aspect_t::name, dt_iop_module_t::params, and dt_gui_gtk_t::reset.
Referenced by gui_init(), and gui_update().
|
inlinestatic |
References m, and mul_mat_vec_2().
Referenced by 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 | ||
) |
References dt_dev_pixelpipe_t::backbuf_height, dt_dev_pixelpipe_t::backbuf_width, dt_dev_pixelpipe_iop_t::buf_out, commit_box(), darktable, dt_iop_module_t::dev, darktable_t::develop, dt_control_get_dev_closeup(), dt_control_get_dev_zoom(), dt_dev_add_history_item, dt_dev_distort_get_iop_pipe(), dt_dev_distort_transform_plus(), dt_dev_get_pointer_zoom_pos(), dt_dev_get_zoom_scale(), DT_DEV_TRANSFORM_DIR_FORW_EXCL, dt_iop_request_focus(), dt_modifiers_include(), DT_PIXEL_APPLY_DPI, FALSE, dt_iop_module_t::gui_data, dt_iop_roi_t::height, dt_iop_module_t::iop_order, keystone_type_populate(), MAX, MIN, dt_iop_module_t::params, dt_develop_t::preview_pipe, TRUE, type, and dt_iop_roi_t::width.
int button_released | ( | struct dt_iop_module_t * | self, |
double | x, | ||
double | y, | ||
int | which, | ||
uint32_t | state | ||
) |
void cleanup_global | ( | dt_iop_module_so_t * | module | ) |
References dt_iop_module_so_t::data, dt_opencl_free_kernel(), dt_iop_clipping_global_data_t::kernel_clip_rotate_bicubic, dt_iop_clipping_global_data_t::kernel_clip_rotate_bilinear, dt_iop_clipping_global_data_t::kernel_clip_rotate_lanczos2, and dt_iop_clipping_global_data_t::kernel_clip_rotate_lanczos3.
void cleanup_pipe | ( | struct dt_iop_module_t * | self, |
dt_dev_pixelpipe_t * | pipe, | ||
dt_dev_pixelpipe_iop_t * | piece | ||
) |
References dt_dev_pixelpipe_iop_t::data.
|
static |
References dt_dev_pixelpipe_t::backbuf_height, dt_dev_pixelpipe_t::backbuf_width, dt_dev_pixelpipe_iop_t::buf_out, CLAMPF, darktable, dt_iop_module_t::dev, darktable_t::develop, dt_dev_add_history_item, dt_dev_distort_backtransform_plus(), dt_dev_distort_get_iop_pipe(), DT_DEV_TRANSFORM_DIR_FORW_EXCL, dt_iop_module_t::enabled, eps, darktable_t::gui, dt_iop_roi_t::height, dt_iop_module_t::iop_order, dt_develop_t::preview_pipe, dt_gui_gtk_t::reset, 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 | ||
) |
References dt_iop_clipping_data_t::a, dt_iop_clipping_data_t::all_off, dt_iop_clipping_data_t::angle, dt_iop_clipping_data_t::b, dt_iop_clipping_data_t::ch, dt_iop_clipping_data_t::cix, dt_iop_clipping_data_t::ciy, CLAMPF, dt_iop_clipping_data_t::crop_auto, dt_iop_clipping_data_t::cw, dt_iop_clipping_data_t::cx, dt_iop_clipping_data_t::cy, dt_iop_clipping_data_t::d, dt_dev_pixelpipe_iop_t::data, dt_iop_clipping_data_t::e, dt_iop_clipping_data_t::enlarge_x, dt_iop_clipping_data_t::enlarge_y, FLAG_FLIP_HORIZONTAL, FLAG_FLIP_VERTICAL, dt_iop_clipping_data_t::flags, dt_iop_clipping_data_t::flip, dt_iop_clipping_data_t::g, gui_has_focus(), dt_iop_clipping_data_t::h, dt_image_t::id, dt_dev_pixelpipe_t::image, dt_iop_clipping_data_t::k_apply, dt_iop_clipping_data_t::k_h, dt_iop_clipping_data_t::k_space, dt_iop_clipping_data_t::k_v, keystone_get_matrix(), dt_iop_clipping_data_t::ki_h, dt_iop_clipping_data_t::ki_v, dt_iop_clipping_data_t::kxa, dt_iop_clipping_data_t::kxb, dt_iop_clipping_data_t::kxc, dt_iop_clipping_data_t::kxd, dt_iop_clipping_data_t::kya, dt_iop_clipping_data_t::kyb, dt_iop_clipping_data_t::kyc, dt_iop_clipping_data_t::kyd, dt_iop_clipping_data_t::m, M_PI, dt_iop_clipping_data_t::tx, and dt_iop_clipping_data_t::ty.
int default_colorspace | ( | dt_iop_module_t * | self, |
dt_dev_pixelpipe_t * | pipe, | ||
dt_dev_pixelpipe_iop_t * | piece | ||
) |
References IOP_CS_RGB.
int default_group | ( | ) |
References IOP_GROUP_EFFECTS.
const char * deprecated_msg | ( | ) |
const char ** description | ( | struct dt_iop_module_t * | self | ) |
References dt_iop_set_description().
|
static |
Referenced by mouse_moved().
int distort_backtransform | ( | dt_iop_module_t * | self, |
dt_dev_pixelpipe_iop_t * | piece, | ||
float *const restrict | points, | ||
size_t | points_count | ||
) |
References backtransform(), dt_dev_pixelpipe_iop_t::buf_in, dt_iop_clipping_data_t::cix, dt_iop_clipping_data_t::ciy, dt_dev_pixelpipe_iop_t::data, DT_DEV_PIXELPIPE_PREVIEW, dt_iop_clipping_data_t::enlarge_x, dt_iop_clipping_data_t::enlarge_y, factor, dt_iop_clipping_data_t::flip, dt_iop_roi_t::height, dt_iop_clipping_data_t::k_apply, dt_iop_clipping_data_t::k_h, dt_iop_clipping_data_t::k_space, dt_iop_clipping_data_t::k_v, keystone_backtransform(), keystone_get_matrix(), dt_iop_clipping_data_t::kxa, dt_iop_clipping_data_t::kxb, dt_iop_clipping_data_t::kxc, dt_iop_clipping_data_t::kxd, dt_iop_clipping_data_t::kya, dt_iop_clipping_data_t::kyb, dt_iop_clipping_data_t::kyc, dt_iop_clipping_data_t::kyd, dt_iop_clipping_data_t::m, dt_dev_pixelpipe_iop_t::pipe, dt_iop_clipping_data_t::tx, dt_iop_clipping_data_t::ty, and dt_iop_roi_t::width.
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 | ||
) |
References dt_iop_clipping_data_t::all_off, dt_iop_clipping_data_t::angle, backtransform(), dt_dev_pixelpipe_iop_t::buf_in, dt_iop_clipping_data_t::cix, dt_iop_clipping_data_t::ciy, 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_clipping_data_t::enlarge_x, dt_iop_clipping_data_t::enlarge_y, dt_iop_clipping_data_t::flags, dt_iop_clipping_data_t::flip, dt_iop_roi_t::height, dt_iop_clipping_data_t::k_apply, dt_iop_clipping_data_t::k_h, dt_iop_clipping_data_t::k_space, dt_iop_clipping_data_t::k_v, keystone_backtransform(), keystone_get_matrix(), dt_iop_clipping_data_t::kxa, dt_iop_clipping_data_t::kxb, dt_iop_clipping_data_t::kxc, dt_iop_clipping_data_t::kxd, dt_iop_clipping_data_t::kya, dt_iop_clipping_data_t::kyb, dt_iop_clipping_data_t::kyc, dt_iop_clipping_data_t::kyd, dt_iop_clipping_data_t::m, dt_iop_roi_t::scale, dt_iop_clipping_data_t::tx, dt_iop_clipping_data_t::ty, dt_iop_roi_t::width, dt_iop_roi_t::x, and dt_iop_roi_t::y.
int distort_transform | ( | dt_iop_module_t * | self, |
dt_dev_pixelpipe_iop_t * | piece, | ||
float *const restrict | points, | ||
size_t | points_count | ||
) |
References dt_dev_pixelpipe_iop_t::buf_in, dt_iop_clipping_data_t::cix, dt_iop_clipping_data_t::ciy, dt_dev_pixelpipe_iop_t::data, DT_DEV_PIXELPIPE_PREVIEW, dt_iop_clipping_data_t::enlarge_x, dt_iop_clipping_data_t::enlarge_y, factor, dt_iop_clipping_data_t::flip, dt_iop_roi_t::height, dt_iop_clipping_data_t::inv_m, dt_iop_clipping_data_t::k_apply, dt_iop_clipping_data_t::k_h, dt_iop_clipping_data_t::k_space, dt_iop_clipping_data_t::k_v, keystone_get_matrix(), keystone_transform(), dt_iop_clipping_data_t::kxa, dt_iop_clipping_data_t::kxb, dt_iop_clipping_data_t::kxc, dt_iop_clipping_data_t::kxd, dt_iop_clipping_data_t::kya, dt_iop_clipping_data_t::kyb, dt_iop_clipping_data_t::kyc, dt_iop_clipping_data_t::kyd, dt_dev_pixelpipe_iop_t::pipe, transform(), dt_iop_clipping_data_t::tx, dt_iop_clipping_data_t::ty, and dt_iop_roi_t::width.
int flags | ( | ) |
|
static |
Referenced by gui_init().
|
static |
References dt_iop_clipping_aspect_t::name.
Referenced by gui_cleanup().
|
inlinestatic |
Referenced by modify_roi_in(), and modify_roi_out().
|
static |
References 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 | ||
) |
void gui_cleanup | ( | struct dt_iop_module_t * | self | ) |
References free_aspect(), dt_iop_module_t::gui_data, and IOP_GUI_FREE.
|
static |
References darktable_t::bauhaus, darktable, dt_draw_set_color_overlay(), dt_gui_draw_rounded_rectangle(), DT_PIXEL_APPLY_DPI, dt_bauhaus_t::pango_font_desc, and TRUE.
Referenced by gui_post_expose().
void gui_focus | ( | struct dt_iop_module_t * | self, |
gboolean | in | ||
) |
References _event_preview_updated_callback(), CLAMPF, commit_box(), darktable, dt_iop_module_t::dev, DT_DEBUG_CONTROL_SIGNAL_CONNECT, DT_SIGNAL_DEVELOP_PREVIEW_PIPE_FINISHED, dt_iop_module_t::enabled, FALSE, dt_iop_module_t::gui_data, dt_develop_t::gui_module, keystone_type_populate(), dt_iop_module_t::params, darktable_t::signals, and TRUE.
|
static |
References dt_iop_module_t::dev, and dt_develop_t::gui_module.
Referenced by commit_params().
void gui_init | ( | struct dt_iop_module_t * | self | ) |
References _aspect_ratio_cmp(), aspect_flip(), aspect_presets_changed(), darktable_t::bauhaus, dt_iop_clipping_aspect_t::d, darktable, dt_bauhaus_combobox_add(), dt_bauhaus_combobox_from_params(), dt_bauhaus_combobox_new(), dt_bauhaus_combobox_set(), dt_bauhaus_combobox_set_editable(), 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_GUI_MODULE, dt_ui_notebook_new(), dt_ui_notebook_page(), dtgtk_cairo_paint_aspectflip(), FALSE, format_aspect(), hvflip_callback(), IOP_GUI_ALLOC, dt_conf_string_entry_t::key, keystone_type_changed(), MAX, MIN, dt_iop_clipping_aspect_t::n, dt_iop_clipping_aspect_t::name, name(), TRUE, dt_conf_string_entry_t::value, and dt_iop_module_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 | ||
) |
References _iop_clipping_set_max_clip(), apply_box_aspect(), dt_dev_pixelpipe_t::backbuf_height, dt_dev_pixelpipe_t::backbuf_width, darktable_t::bauhaus, dt_dev_pixelpipe_iop_t::buf_out, dt_control_t::button_down, dt_control_t::button_down_which, CLAMPF, darktable_t::control, darktable, dt_iop_module_t::dev, dt_control_get_dev_closeup(), dt_control_get_dev_zoom(), dt_control_get_dev_zoom_x(), dt_control_get_dev_zoom_y(), dt_dev_distort_get_iop_pipe(), dt_dev_distort_transform_plus(), dt_dev_get_pointer_zoom_pos(), dt_dev_get_processed_size(), dt_dev_get_zoom_scale(), DT_DEV_TRANSFORM_DIR_FORW_EXCL, dt_draw_set_color_overlay(), dt_gui_draw_rounded_rectangle(), dt_guides_draw(), DT_PIXEL_APPLY_DPI, FALSE, get_grab(), GRAB_BOTTOM, GRAB_BOTTOM_LEFT, GRAB_BOTTOM_RIGHT, GRAB_HORIZONTAL, GRAB_LEFT, GRAB_RIGHT, GRAB_TOP, GRAB_TOP_LEFT, GRAB_TOP_RIGHT, dt_iop_module_t::gui_data, gui_draw_sym(), height, dt_iop_roi_t::height, dt_iop_module_t::iop_order, M_PI, MAX, MIN, dt_bauhaus_t::pango_font_desc, dt_iop_module_t::params, dt_develop_t::preview_pipe, TRUE, width, and dt_iop_roi_t::width.
void gui_reset | ( | struct dt_iop_module_t * | self | ) |
References dt_conf_set_int(), and dt_iop_module_t::gui_data.
void gui_update | ( | struct dt_iop_module_t * | self | ) |
References _ratio_get_aspect(), aspect_presets_changed(), CLAMPF, dt_iop_clipping_aspect_t::d, dt_bauhaus_combobox_get(), dt_bauhaus_combobox_set(), dt_bauhaus_combobox_set_text(), dt_conf_get_int(), FALSE, dt_iop_module_t::gui_data, keystone_type_populate(), dt_iop_clipping_aspect_t::n, dt_iop_module_t::params, and TRUE.
gboolean has_defaults | ( | struct dt_iop_module_t * | self | ) |
|
static |
References commit_box(), darktable, dt_bauhaus_combobox_get(), flip(), darktable_t::gui, dt_iop_module_t::gui_data, dt_iop_module_t::params, and dt_gui_gtk_t::reset.
Referenced by gui_init().
void init_global | ( | dt_iop_module_so_t * | module | ) |
void init_pipe | ( | struct dt_iop_module_t * | self, |
dt_dev_pixelpipe_t * | pipe, | ||
dt_dev_pixelpipe_iop_t * | piece | ||
) |
References dt_dev_pixelpipe_iop_t::data, and dt_dev_pixelpipe_iop_t::data_size.
|
inlinestatic |
References m.
Referenced by modify_roi_out().
|
static |
References apply_box_aspect(), dt_control_queue_redraw_center(), GRAB_HORIZONTAL, dt_iop_module_t::params, and void().
Referenced by aspect_flip().
|
inlinestatic |
Referenced by distort_backtransform(), distort_mask(), modify_roi_in(), and process().
|
static |
Referenced by commit_params(), distort_backtransform(), distort_mask(), distort_transform(), and process().
|
inlinestatic |
Referenced by distort_transform(), and modify_roi_out().
|
static |
References commit_box(), dt_bauhaus_combobox_get(), dt_control_queue_redraw_center(), FALSE, dt_iop_module_t::gui_data, keystone_type_populate(), dt_iop_module_t::params, and TRUE.
Referenced by gui_init(), and keystone_type_populate().
|
static |
int legacy_params | ( | dt_iop_module_t * | self, |
const void *const | old_params, | ||
const int | old_version, | ||
void * | new_params, | ||
const int | new_version | ||
) |
References dt_iop_clipping_params_t::angle, dt_iop_clipping_params_t::ch, dt_iop_clipping_params_t::crop_auto, dt_iop_clipping_params_t::cw, dt_iop_clipping_params_t::cx, dt_iop_clipping_params_t::cy, f(), dt_iop_clipping_params_t::k_apply, dt_iop_clipping_params_t::k_h, dt_iop_clipping_params_t::k_sym, dt_iop_clipping_params_t::k_type, dt_iop_clipping_params_t::k_v, dt_iop_clipping_params_t::kxa, dt_iop_clipping_params_t::kxb, dt_iop_clipping_params_t::kxc, dt_iop_clipping_params_t::kxd, dt_iop_clipping_params_t::kya, dt_iop_clipping_params_t::kyb, dt_iop_clipping_params_t::kyc, dt_iop_clipping_params_t::kyd, dt_iop_clipping_params_t::ratio_d, and dt_iop_clipping_params_t::ratio_n.
void modify_roi_in | ( | struct dt_iop_module_t * | self, |
struct dt_dev_pixelpipe_iop_t * | piece, | ||
const dt_iop_roi_t * | roi_out, | ||
dt_iop_roi_t * | roi_in | ||
) |
References dt_iop_clipping_data_t::a, adjust_aabb(), dt_iop_clipping_data_t::all_off, dt_iop_clipping_data_t::angle, dt_iop_clipping_data_t::b, backtransform(), dt_dev_pixelpipe_iop_t::buf_in, dt_iop_clipping_data_t::cix, dt_iop_clipping_data_t::ciy, dt_iop_clipping_data_t::d, dt_dev_pixelpipe_iop_t::data, dt_iop_clipping_data_t::e, dt_iop_clipping_data_t::enlarge_x, dt_iop_clipping_data_t::enlarge_y, dt_iop_clipping_data_t::flip, dt_iop_clipping_data_t::g, get_corner(), dt_iop_clipping_data_t::h, dt_iop_roi_t::height, dt_iop_clipping_data_t::k_apply, dt_iop_clipping_data_t::k_h, dt_iop_clipping_data_t::k_space, dt_iop_clipping_data_t::k_v, keystone_backtransform(), dt_iop_clipping_data_t::kxa, dt_iop_clipping_data_t::kya, dt_iop_clipping_data_t::m, dt_iop_roi_t::scale, dt_iop_clipping_data_t::tx, dt_iop_clipping_data_t::ty, 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, |
struct dt_dev_pixelpipe_iop_t * | piece, | ||
dt_iop_roi_t * | roi_out, | ||
const dt_iop_roi_t * | roi_in_orig | ||
) |
References dt_iop_clipping_data_t::a, dt_iop_clipping_data_t::angle, dt_iop_clipping_data_t::b, dt_iop_clipping_data_t::ch, dt_iop_clipping_data_t::cix, dt_iop_clipping_data_t::ciy, dt_iop_clipping_data_t::crop_auto, dt_iop_clipping_data_t::cw, dt_iop_clipping_data_t::cx, dt_iop_clipping_data_t::cy, dt_iop_clipping_data_t::d, dt_dev_pixelpipe_iop_t::data, dt_iop_clipping_data_t::e, dt_iop_clipping_data_t::enlarge_x, dt_iop_clipping_data_t::enlarge_y, f(), FLAG_FLIP_HORIZONTAL, FLAG_FLIP_VERTICAL, dt_iop_clipping_data_t::flags, flip(), dt_iop_clipping_data_t::flip, dt_iop_clipping_data_t::g, get_corner(), dt_iop_clipping_data_t::h, height, dt_iop_roi_t::height, dt_iop_clipping_data_t::inv_m, inv_matrix(), dt_iop_clipping_data_t::k_apply, dt_iop_clipping_data_t::k_h, dt_iop_clipping_data_t::k_space, dt_iop_clipping_data_t::k_v, keystone_transform(), dt_iop_clipping_data_t::ki_h, dt_iop_clipping_data_t::ki_v, dt_iop_clipping_data_t::kxa, dt_iop_clipping_data_t::kya, dt_iop_clipping_data_t::m, transform(), dt_iop_clipping_data_t::tx, dt_iop_clipping_data_t::ty, width, dt_iop_roi_t::width, dt_iop_roi_t::x, and dt_iop_roi_t::y.
int mouse_moved | ( | struct dt_iop_module_t * | self, |
double | x, | ||
double | y, | ||
double | pressure, | ||
int | which | ||
) |
References _iop_clipping_set_max_clip(), apply_box_aspect(), dt_dev_pixelpipe_t::backbuf_height, dt_dev_pixelpipe_t::backbuf_width, dt_dev_pixelpipe_iop_t::buf_out, dt_control_t::button_down, dt_control_t::button_down_which, darktable_t::control, darktable, 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_change_cursor(), dt_control_get_dev_closeup(), dt_control_get_dev_zoom(), dt_control_hinter_message(), dt_control_queue_redraw_center(), dt_dev_distort_backtransform_plus(), dt_dev_distort_get_iop_pipe(), dt_dev_get_pointer_zoom_pos(), dt_dev_get_zoom_scale(), DT_DEV_TRANSFORM_DIR_FORW_EXCL, DT_PIXEL_APPLY_DPI, FALSE, 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, darktable_t::gui, dt_iop_module_t::gui_data, dt_iop_roi_t::height, dt_iop_module_t::iop_order, dt_iop_module_t::params, dt_develop_t::preview_pipe, dt_gui_gtk_t::reset, TRUE, and dt_iop_roi_t::width.
const char * name | ( | ) |
Referenced by gui_init().
int operation_tags | ( | ) |
References IOP_TAG_CLIPPING, and IOP_TAG_DISTORT.
int operation_tags_filter | ( | ) |
References IOP_TAG_CLIPPING, and IOP_TAG_DECORATION.
void process | ( | struct dt_iop_module_t * | self, |
dt_dev_pixelpipe_iop_t * | piece, | ||
const void *const | ivoid, | ||
void *const | ovoid, | ||
const dt_iop_roi_t *const | roi_in, | ||
const dt_iop_roi_t *const | roi_out | ||
) |
References dt_iop_clipping_data_t::all_off, dt_iop_clipping_data_t::angle, backtransform(), dt_dev_pixelpipe_iop_t::buf_in, dt_iop_clipping_data_t::cix, dt_iop_clipping_data_t::ciy, dt_dev_pixelpipe_iop_t::colors, dt_dev_pixelpipe_iop_t::data, dt_interpolation_compute_pixel4c(), dt_interpolation_new(), DT_INTERPOLATION_USERPREF_WARP, dt_iop_have_required_input_format(), dt_iop_image_copy_by_size(), dt_iop_clipping_data_t::enlarge_x, dt_iop_clipping_data_t::enlarge_y, dt_iop_clipping_data_t::flags, dt_iop_clipping_data_t::flip, dt_iop_roi_t::height, dt_iop_clipping_data_t::k_apply, dt_iop_clipping_data_t::k_h, dt_iop_clipping_data_t::k_space, dt_iop_clipping_data_t::k_v, keystone_backtransform(), keystone_get_matrix(), dt_iop_clipping_data_t::kxa, dt_iop_clipping_data_t::kxb, dt_iop_clipping_data_t::kxc, dt_iop_clipping_data_t::kxd, dt_iop_clipping_data_t::kya, dt_iop_clipping_data_t::kyb, dt_iop_clipping_data_t::kyc, dt_iop_clipping_data_t::kyd, dt_iop_clipping_data_t::m, dt_iop_roi_t::scale, dt_iop_clipping_data_t::tx, dt_iop_clipping_data_t::ty, dt_iop_roi_t::width, dt_iop_roi_t::x, and dt_iop_roi_t::y.
void reload_defaults | ( | dt_iop_module_t * | self | ) |
|
inlinestatic |
References m, and mul_mat_vec_2().
Referenced by distort_transform(), dt_view_image_get_surface(), modify_roi_out(), and process().