![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "bauhaus/bauhaus.h"#include "common/debug.h"#include "common/imagebuf.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 "dtgtk/button.h"#include "dtgtk/resetlabel.h"#include "dtgtk/togglebutton.h"#include "gui/color_picker_proxy.h"#include "gui/draw.h"#include "gui/gtk.h"#include "gui/presets.h"#include "iop/iop_api.h"#include <gdk/gdkkeysyms.h>#include <gtk/gtk.h>#include <inttypes.h>#include <math.h>#include <stdlib.h>#include <string.h>
Include dependency graph for borders.c:Data Structures | |
| struct | dt_iop_borders_params_t |
| struct | dt_iop_borders_gui_data_t |
| struct | dt_iop_borders_global_data_t |
| struct | border_positions_t |
Macros | |
| #define | DT_IOP_BORDERS_ASPECT_COUNT 12 |
| #define | DT_IOP_BORDERS_ASPECT_IMAGE_IDX 0 |
| #define | DT_IOP_BORDERS_ASPECT_CONSTANT_IDX 11 |
| #define | DT_IOP_BORDERS_ASPECT_IMAGE_VALUE 0.0f |
| #define | DT_IOP_BORDERS_ASPECT_CONSTANT_VALUE -1.0f |
| #define | DT_IOP_BORDERS_ASPECT_ORIENTATION_AUTO 0 |
| #define | DT_IOP_BORDERS_ASPECT_ORIENTATION_PORTRAIT 1 |
| #define | DT_IOP_BORDERS_ASPECT_ORIENTATION_LANDSCAPE 2 |
| #define | DT_IOP_BORDERS_POSITION_H_COUNT 5 |
| #define | DT_IOP_BORDERS_POSITION_V_COUNT 5 |
Typedefs | |
| typedef struct dt_iop_borders_params_t | dt_iop_borders_params_t |
| typedef struct dt_iop_borders_gui_data_t | dt_iop_borders_gui_data_t |
| typedef struct dt_iop_borders_global_data_t | dt_iop_borders_global_data_t |
| typedef struct dt_iop_borders_params_t | dt_iop_borders_data_t |
| #define DT_IOP_BORDERS_ASPECT_CONSTANT_IDX 11 |
| #define DT_IOP_BORDERS_ASPECT_CONSTANT_VALUE -1.0f |
| #define DT_IOP_BORDERS_ASPECT_COUNT 12 |
| #define DT_IOP_BORDERS_ASPECT_IMAGE_IDX 0 |
| #define DT_IOP_BORDERS_ASPECT_IMAGE_VALUE 0.0f |
| #define DT_IOP_BORDERS_ASPECT_ORIENTATION_AUTO 0 |
| #define DT_IOP_BORDERS_ASPECT_ORIENTATION_LANDSCAPE 2 |
| #define DT_IOP_BORDERS_ASPECT_ORIENTATION_PORTRAIT 1 |
| #define DT_IOP_BORDERS_POSITION_H_COUNT 5 |
| #define DT_IOP_BORDERS_POSITION_V_COUNT 5 |
| typedef struct dt_iop_borders_params_t dt_iop_borders_data_t |
| typedef struct dt_iop_borders_global_data_t dt_iop_borders_global_data_t |
| typedef struct dt_iop_borders_gui_data_t dt_iop_borders_gui_data_t |
| typedef struct dt_iop_borders_params_t dt_iop_borders_params_t |
|
static |
References darktable, darktable_t::develop, dt_bauhaus_combobox_get(), dt_bauhaus_combobox_get_text(), dt_bauhaus_combobox_length(), dt_bauhaus_slider_set(), dt_dev_add_history_item, DT_IOP_BORDERS_ASPECT_COUNT, dt_iop_color_picker_reset(), darktable_t::gui, dt_iop_module_t::gui_data, dt_iop_module_t::params, dt_gui_gtk_t::reset, and TRUE.
Referenced by gui_init().
| void cleanup_global | ( | dt_iop_module_so_t * | module | ) |
| 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.
| void color_picker_apply | ( | dt_iop_module_t * | self, |
| GtkWidget * | picker, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
|
static |
References darktable, darktable_t::develop, dt_dev_add_history_item, dt_iop_color_picker_reset(), darktable_t::gui, dt_iop_module_t::params, dt_gui_gtk_t::reset, and TRUE.
Referenced by gui_init().
| 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_dev_pixelpipe_iop_t::data.
| void copy_image_with_border | ( | float * | out, |
| const float *const | in, | ||
| const struct border_positions_t * | binfo | ||
| ) |
References border_positions_t::bcolor, border_positions_t::border_bot, border_positions_t::border_left, border_positions_t::border_right, copy_pixels(), border_positions_t::fl_bot, border_positions_t::fl_left, border_positions_t::fl_right, border_positions_t::flcolor, border_positions_t::height, border_positions_t::image_bot, border_positions_t::image_left, border_positions_t::image_right, border_positions_t::image_top, set_pixels(), border_positions_t::stride, and border_positions_t::width.
Referenced by process().
|
inlinestatic |
Referenced by copy_image_with_border().
| 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 ** description | ( | struct dt_iop_module_t * | self | ) |
References dt_iop_set_description().
| 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 | ||
| ) |
| int distort_transform | ( | dt_iop_module_t * | self, |
| dt_dev_pixelpipe_iop_t * | piece, | ||
| float *const restrict | points, | ||
| size_t | points_count | ||
| ) |
| int flags | ( | ) |
References IOP_FLAGS_ALLOW_TILING, and IOP_FLAGS_TILING_FULL_ROI.
|
static |
References darktable, darktable_t::develop, dt_dev_add_history_item, dt_iop_color_picker_reset(), darktable_t::gui, dt_iop_module_t::params, dt_gui_gtk_t::reset, and TRUE.
Referenced by gui_init().
| void gui_changed | ( | dt_iop_module_t * | self, |
| GtkWidget * | w, | ||
| void * | previous | ||
| ) |
| void gui_init | ( | struct dt_iop_module_t * | self | ) |
References aspect_changed(), darktable_t::bauhaus, colorpick_color_set(), darktable, dt_iop_module_t::default_params, dt_bauhaus_combobox_add(), dt_bauhaus_combobox_from_params(), dt_bauhaus_combobox_new(), dt_bauhaus_combobox_set_editable(), dt_bauhaus_slider_from_params(), dt_bauhaus_slider_set_digits(), dt_bauhaus_slider_set_format(), dt_bauhaus_widget_set_label(), dt_color_picker_new(), DT_COLOR_PICKER_POINT, DT_GUI_MODULE, dtgtk_reset_label_new(), FALSE, frame_colorpick_color_set(), gui_init_aspect(), gui_init_positions(), IOP_GUI_ALLOC, position_h_changed(), position_v_changed(), TRUE, and dt_iop_module_t::widget.
|
static |
|
static |
References dt_bauhaus_combobox_add(), and dt_iop_module_t::gui_data.
Referenced by gui_init().
| void gui_update | ( | struct dt_iop_module_t * | self | ) |
| void init | ( | dt_iop_module_t * | self | ) |
| 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.
| void init_presets | ( | dt_iop_module_so_t * | self | ) |
References DEVELOP_BLEND_CS_NONE, dt_gui_presets_add_generic(), dt_iop_module_so_t::op, and TRUE.
| 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_borders_params_t::aspect, dt_iop_borders_params_t::aspect_orient, dt_iop_borders_params_t::color, dt_iop_module_t::default_params, DT_IOP_BORDERS_ASPECT_ORIENTATION_LANDSCAPE, DT_IOP_BORDERS_ASPECT_ORIENTATION_PORTRAIT, FALSE, dt_iop_borders_params_t::max_border_size, size, and dt_iop_borders_params_t::size.
| 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_dev_pixelpipe_iop_t::buf_in, dt_dev_pixelpipe_iop_t::buf_out, dt_dev_pixelpipe_iop_t::data, dt_iop_roi_t::height, MAX, MIN, dt_iop_borders_params_t::pos_h, dt_iop_borders_params_t::pos_v, 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, |
| struct dt_dev_pixelpipe_iop_t * | piece, | ||
| dt_iop_roi_t * | roi_out, | ||
| const dt_iop_roi_t * | roi_in | ||
| ) |
References dt_iop_borders_params_t::aspect, dt_iop_borders_params_t::aspect_orient, dt_dev_pixelpipe_iop_t::data, DT_IOP_BORDERS_ASPECT_CONSTANT_VALUE, DT_IOP_BORDERS_ASPECT_IMAGE_VALUE, DT_IOP_BORDERS_ASPECT_ORIENTATION_AUTO, DT_IOP_BORDERS_ASPECT_ORIENTATION_LANDSCAPE, DT_IOP_BORDERS_ASPECT_ORIENTATION_PORTRAIT, dt_iop_roi_t::height, dt_iop_borders_params_t::max_border_size, size, dt_iop_borders_params_t::size, and dt_iop_roi_t::width.
| const char * name | ( | ) |
| int operation_tags | ( | ) |
References IOP_TAG_DECORATION, and IOP_TAG_DISTORT.
|
static |
References darktable, darktable_t::develop, dt_bauhaus_combobox_get(), dt_bauhaus_combobox_get_text(), dt_bauhaus_combobox_length(), dt_bauhaus_slider_set(), dt_dev_add_history_item, DT_IOP_BORDERS_POSITION_H_COUNT, dt_iop_color_picker_reset(), darktable_t::gui, dt_iop_module_t::gui_data, dt_iop_module_t::params, dt_gui_gtk_t::reset, and TRUE.
Referenced by gui_init().
|
static |
References darktable, darktable_t::develop, dt_bauhaus_combobox_get(), dt_bauhaus_combobox_get_text(), dt_bauhaus_combobox_length(), dt_bauhaus_slider_set(), dt_dev_add_history_item, DT_IOP_BORDERS_POSITION_V_COUNT, dt_iop_color_picker_reset(), darktable_t::gui, dt_iop_module_t::gui_data, dt_iop_module_t::params, dt_gui_gtk_t::reset, and TRUE.
Referenced by gui_init().
| 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 border_positions_t::bcolor, border_positions_t::border_bot, border_positions_t::border_left, border_positions_t::border_right, border_positions_t::border_top, dt_dev_pixelpipe_iop_t::buf_in, dt_dev_pixelpipe_iop_t::buf_out, dt_iop_borders_params_t::color, copy_image_with_border(), dt_dev_pixelpipe_iop_t::data, border_positions_t::fl_bot, border_positions_t::fl_left, border_positions_t::fl_right, border_positions_t::fl_top, dt_iop_borders_params_t::frame_color, dt_iop_borders_params_t::frame_offset, dt_iop_borders_params_t::frame_size, dt_iop_roi_t::height, MAX, MIN, dt_iop_borders_params_t::pos_h, dt_iop_borders_params_t::pos_v, dt_iop_roi_t::scale, dt_iop_roi_t::width, dt_iop_roi_t::x, and dt_iop_roi_t::y.
|
inlinestatic |
Referenced by copy_image_with_border().