![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "common/global_mutexes.h"#include "common/paths.h"#include "system/macros.h"#include "common/module_versioning.h"#include "system/mem_alloc.h"#include "system/openmp.h"#include "system/target_clones.h"#include "common/conf.h"#include "widgets/bauhaus.h"#include "common/imagebuf.h"#include "common/variables.h"#include "develop/develop.h"#include "develop/imageop.h"#include "develop/imageop_gui.h"#include "widgets/button.h"#include "widgets/togglebutton.h"#include "gui/color_picker_proxy.h"#include "iop/iop_api.h"#include <assert.h>#include <gtk/gtk.h>#include <inttypes.h>#include <math.h>#include <stdlib.h>#include <string.h>#include <librsvg/rsvg.h>#include <librsvg/rsvg-cairo.h>#include "common/file_location.h"#include "common/utility.h"#include "widgets/accelerators.h"#include "widgets/container.h"#include "widgets/label.h"
Include dependency graph for watermark.c:Go to the source code of this file.
Data Structures | |
| struct | dt_iop_watermark_params_t |
| struct | dt_iop_watermark_data_t |
| struct | dt_iop_watermark_gui_data_t |
Typedefs | |
| typedef enum dt_iop_watermark_base_scale_t | dt_iop_watermark_base_scale_t |
| typedef enum dt_iop_watermark_type_t | dt_iop_watermark_type_t |
| typedef struct dt_iop_watermark_params_t | dt_iop_watermark_params_t |
| typedef struct dt_iop_watermark_data_t | dt_iop_watermark_data_t |
| typedef struct dt_iop_watermark_gui_data_t | dt_iop_watermark_gui_data_t |
Enumerations | |
| enum | dt_iop_watermark_base_scale_t { DT_SCALE_IMAGE = 0 , DT_SCALE_LARGER_BORDER = 1 , DT_SCALE_SMALLER_BORDER = 2 } |
| enum | dt_iop_watermark_type_t { DT_WTM_SVG = 0 , DT_WTM_PNG = 1 } |
Variables | |
| static dt_pthread_mutex_t | _rsvg_lock |
| static pthread_once_t | _rsvg_lock_once = PTHREAD_ONCE_INIT |
| typedef struct dt_iop_watermark_data_t dt_iop_watermark_data_t |
| typedef struct dt_iop_watermark_gui_data_t dt_iop_watermark_gui_data_t |
| typedef struct dt_iop_watermark_params_t dt_iop_watermark_params_t |
| typedef enum dt_iop_watermark_type_t dt_iop_watermark_type_t |
| Enumerator | |
|---|---|
| DT_SCALE_IMAGE | |
| DT_SCALE_LARGER_BORDER | |
| DT_SCALE_SMALLER_BORDER | |
Definition at line 118 of file watermark.c.
| Enumerator | |
|---|---|
| DT_WTM_SVG | |
| DT_WTM_PNG | |
Definition at line 125 of file watermark.c.
|
static |
Definition at line 407 of file watermark.c.
References _text_color_font_set_sensitive(), dt_bauhaus_combobox_set(), g, and i.
Referenced by gui_update(), and refresh_watermarks().
Definition at line 109 of file watermark.c.
References _rsvg_lock, and dt_pthread_mutex_init().
Referenced by process().
|
static |
Definition at line 423 of file watermark.c.
References dt_free, and dt_util_str_replace().
Referenced by _string_substitute().
|
static |
Definition at line 439 of file watermark.c.
References _string_escape(), dt_free, and dt_util_str_replace().
Referenced by _watermark_get_svgdoc().
|
static |
Definition at line 394 of file watermark.c.
References extension(), g, and IS_NULL_PTR.
Referenced by _combo_box_set_active_text(), and watermark_callback().
|
static |
Definition at line 448 of file watermark.c.
References _string_substitute(), dt_iop_watermark_data_t::color, dt_free, dt_image_full_path(), dt_lib_export_metadata_get_conf_flags(), DT_PATH_MAX, dt_variables_expand(), dt_variables_params_destroy(), dt_variables_params_init(), dt_variables_set_tags_flags(), FALSE, flags(), dt_iop_watermark_data_t::font, dt_image_t::id, and dt_iop_watermark_data_t::text.
Referenced by process().
Definition at line 1003 of file watermark.c.
References alignment_callback(), dt_iop_module_t::dev, dt_dev_add_history_item, dt_gui_widgets_suppressed(), dt_iop_gui_data(), FALSE, g, i, p, dt_iop_module_t::params, and TRUE.
Referenced by alignment_callback(), and gui_init().
| void cleanup_pipe | ( | struct dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Definition at line 1105 of file watermark.c.
References dt_dev_pixelpipe_iop_t::data, and dt_free_align.
| void color_picker_apply | ( | dt_iop_module_t * | self, |
| GtkWidget * | picker, | ||
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Definition at line 905 of file watermark.c.
References dt_iop_module_t::dev, dt_dev_add_history_item, dt_iop_gui_data(), g, p, dt_iop_module_t::params, dt_iop_module_t::picked_color, and TRUE.
|
static |
Definition at line 1043 of file watermark.c.
References dt_iop_module_t::dev, dt_conf_set_float(), dt_dev_add_history_item, dt_gui_widgets_suppressed(), p, dt_iop_module_t::params, 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 | ||
| ) |
Definition at line 1074 of file watermark.c.
References d, dt_dev_pixelpipe_iop_t::data, k, and p.
| int default_colorspace | ( | dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| const dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Definition at line 380 of file watermark.c.
References IOP_CS_RGB.
| int default_group | ( | ) |
Definition at line 370 of file watermark.c.
References IOP_GROUP_EFFECTS.
| const char ** description | ( | struct dt_iop_module_t * | self | ) |
Definition at line 356 of file watermark.c.
References dt_iop_set_description().
| int flags | ( | ) |
Definition at line 365 of file watermark.c.
References IOP_FLAGS_INCLUDE_IN_STYLES, and IOP_FLAGS_SUPPORTS_BLENDING.
Referenced by _watermark_get_svgdoc().
Definition at line 1061 of file watermark.c.
References dt_iop_module_t::dev, dt_conf_set_string(), dt_dev_add_history_item, dt_free, dt_gui_widgets_suppressed(), p, dt_iop_module_t::params, and TRUE.
Referenced by gui_init().
| void gui_cleanup | ( | struct dt_iop_module_t * | self | ) |
Definition at line 1270 of file watermark.c.
References dt_free_gpointer(), dt_iop_gui_data(), g, and IOP_GUI_FREE.
| void gui_init | ( | struct dt_iop_module_t * | self | ) |
Definition at line 1140 of file watermark.c.
References alignment_callback(), color, colorpick_color_set(), CPF_SPECIAL_FLAG, dt_accels_disconnect_on_text_input(), dt_bauhaus_combobox_from_params(), dt_bauhaus_combobox_new(), dt_bauhaus_get_global(), dt_bauhaus_slider_from_params(), dt_bauhaus_slider_set_digits(), dt_bauhaus_slider_set_format(), dt_bauhaus_slider_set_soft_max(), dt_color_picker_new(), DT_COLOR_PICKER_POINT, dt_conf_get_float(), dt_conf_get_string_const(), dt_free, DT_GUI_BOX_SPACING, dt_gui_container_first_child(), DT_GUI_MODULE, dt_iop_gui_reset_label_new(), dt_loc_get_datadir(), dt_loc_get_user_config_dir(), DT_PATH_MAX, dt_ui_label_new(), dt_ui_section_label_new(), dtgtk_button_new(), dtgtk_cairo_paint_alignment(), dtgtk_cairo_paint_refresh(), dtgtk_togglebutton_new(), FALSE, fontsel_callback(), g, dt_iop_module_t::gui, i, IOP_GUI_ALLOC, p, dt_iop_module_t::params, refresh_callback(), refresh_watermarks(), text_callback(), tooltip, TRUE, watermark_callback(), and dt_iop_module_gui_t::widget.
| void gui_update | ( | struct dt_iop_module_t * | self | ) |
Refresh GUI controls from current params and configuration.
gui callbacks, these are needed.
gui setup and update, these are needed.
Definition at line 1112 of file watermark.c.
References _combo_box_set_active_text(), color, dt_iop_gui_data(), FALSE, g, i, p, dt_iop_module_t::params, and TRUE.
| void init | ( | dt_iop_module_t * | module | ) |
Definition at line 1128 of file watermark.c.
References dt_iop_default_init().
| void init_pipe | ( | struct dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Definition at line 1099 of file watermark.c.
References dt_dev_pixelpipe_iop_t::data, dt_dev_pixelpipe_iop_t::data_size, and dt_calloc_align().
| void input_format | ( | dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece, | ||
| dt_iop_buffer_dsc_t * | dsc | ||
| ) |
Definition at line 385 of file watermark.c.
References dt_iop_buffer_dsc_t::channels, dt_iop_buffer_dsc_t::datatype, default_input_format(), and TYPE_FLOAT.
| int legacy_params | ( | dt_iop_module_t * | self, |
| const void *const | old_params, | ||
| const int | old_version, | ||
| void * | new_params, | ||
| const int | new_version | ||
| ) |
opacity value of rendering watermark
scale value of rendering watermark
Pixel independent xoffset, 0 to 1
Pixel independent yoffset, 0 to 1
Alignment value 0-8 3x3
opacity value of rendering watermark
scale value of rendering watermark
Pixel independent xoffset, 0 to 1
Pixel independent yoffset, 0 to 1
Alignment value 0-8 3x3
opacity value of rendering watermark
scale value of rendering watermark
Pixel independent xoffset, 0 to 1
Pixel independent yoffset, 0 to 1
Alignment value 0-8 3x3
Rotation
opacity value of rendering watermark
scale value of rendering watermark
Pixel independent xoffset, 0 to 1
Pixel independent yoffset, 0 to 1
Alignment value 0-8 3x3
Rotation
Definition at line 185 of file watermark.c.
References color, d, dt_iop_module_t::default_params, DT_SCALE_IMAGE, and n.
|
static |
Definition at line 931 of file watermark.c.
References dt_bauhaus_combobox_add(), dt_free, dt_free_gpointer(), extension(), and g.
Referenced by refresh_watermarks().
| const char * name | ( | ) |
Definition at line 351 of file watermark.c.
| int operation_tags | ( | ) |
Definition at line 375 of file watermark.c.
References 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 518 of file watermark.c.
References __OMP_PARALLEL_FOR__, _rsvg_lock, _rsvg_lock_init(), _rsvg_lock_once, _watermark_get_svgdoc(), dt_iop_watermark_data_t::alignment, dt_dev_pixelpipe_iop_t::buf_in, ch, dt_dev_pixelpipe_iop_t::data, dt_dev_pixelpipe_t::dev, dimension(), dt_free, dt_get_svg_dimension(), dt_iop_image_copy_by_size(), dt_loc_get_datadir(), dt_loc_get_user_config_dir(), DT_PATH_MAX, dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), dt_render_svg(), DT_SCALE_IMAGE, DT_SCALE_LARGER_BORDER, DT_SCALE_SMALLER_BORDER, DT_WTM_PNG, DT_WTM_SVG, error(), extension(), dt_iop_watermark_data_t::filename, dt_iop_roi_t::height, i, dt_develop_t::image_storage, IS_NULL_PTR, M_PI, dt_iop_watermark_data_t::opacity, out, ovoid, dt_dev_pixelpipe_iop_t::roi_in, dt_dev_pixelpipe_iop_t::roi_out, dt_iop_watermark_data_t::rotate, dt_iop_watermark_data_t::scale, dt_iop_roi_t::scale, dt_iop_watermark_data_t::sizeto, type, dt_iop_roi_t::width, dt_iop_roi_t::x, dt_iop_watermark_data_t::xoffset, dt_iop_roi_t::y, and dt_iop_watermark_data_t::yoffset.
Definition at line 997 of file watermark.c.
References refresh_watermarks().
Referenced by gui_init().
|
static |
Definition at line 971 of file watermark.c.
References _combo_box_set_active_text(), dt_bauhaus_combobox_clear(), dt_free_gpointer(), dt_iop_gui_data(), dt_loc_get_datadir(), dt_loc_get_user_config_dir(), DT_PATH_MAX, g, load_watermarks(), p, dt_iop_module_t::params, and watermark_callback().
Referenced by gui_init(), and refresh_callback().
| void reload_defaults | ( | dt_iop_module_t * | module | ) |
Definition at line 1133 of file watermark.c.
References d.
Definition at line 1033 of file watermark.c.
References dt_iop_module_t::dev, dt_conf_set_string(), dt_dev_add_history_item, dt_gui_widgets_suppressed(), p, dt_iop_module_t::params, and TRUE.
Referenced by gui_init().
Definition at line 891 of file watermark.c.
References _text_color_font_set_sensitive(), dt_iop_module_t::dev, dt_bauhaus_combobox_get(), dt_dev_add_history_item, dt_gui_widgets_suppressed(), dt_iop_gui_data(), g, n, p, dt_iop_module_t::params, and TRUE.
Referenced by gui_init(), and refresh_watermarks().
|
static |
Definition at line 106 of file watermark.c.
Referenced by _rsvg_lock_init(), and process().
|
static |
Definition at line 107 of file watermark.c.
Referenced by process().