![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "common/darktable.h"#include "bauhaus/bauhaus.h"#include "common/imagebuf.h"#include "common/tags.h"#include "common/variables.h"#include "common/datetime.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/gtk.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/metadata.h"#include "common/utility.h"
Include dependency graph for watermark.c: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 } |
| 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 |
|
static |
References _text_color_font_set_sensitive(), dt_bauhaus_combobox_set(), g, and i.
Referenced by gui_update(), and refresh_watermarks().
|
static |
References dt_free, and dt_util_str_replace().
Referenced by _string_substitute().
|
static |
References _string_escape(), dt_free, and dt_util_str_replace().
Referenced by _watermark_get_svgdoc().
|
static |
References extension(), and g.
Referenced by _combo_box_set_active_text(), and watermark_callback().
|
static |
References _string_substitute(), c, dt_iop_watermark_data_t::color, dt_free, dt_image_full_path(), dt_lib_export_metadata_get_conf_flags(), 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, PATH_MAX, and dt_iop_watermark_data_t::text.
Referenced by process().
References alignment_callback(), darktable, darktable_t::develop, dt_dev_add_history_item, FALSE, g, darktable_t::gui, dt_iop_module_t::gui_data, i, p, dt_iop_module_t::params, dt_gui_gtk_t::reset, 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 | ||
| ) |
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 | ||
| ) |
References c, darktable, darktable_t::develop, dt_dev_add_history_item, g, dt_iop_module_t::gui_data, p, dt_iop_module_t::params, dt_iop_module_t::picked_color, and TRUE.
|
static |
References c, darktable, darktable_t::develop, dt_conf_set_float(), dt_dev_add_history_item, darktable_t::gui, p, 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 d, dt_dev_pixelpipe_iop_t::data, and p.
| int default_colorspace | ( | dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| const 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 flags | ( | ) |
References IOP_FLAGS_INCLUDE_IN_STYLES, and IOP_FLAGS_SUPPORTS_BLENDING.
Referenced by _watermark_get_svgdoc().
References darktable, darktable_t::develop, dt_conf_set_string(), dt_dev_add_history_item, dt_free, darktable_t::gui, p, dt_iop_module_t::params, dt_gui_gtk_t::reset, and TRUE.
Referenced by gui_init().
| void gui_cleanup | ( | struct dt_iop_module_t * | self | ) |
References dt_free_gpointer(), g, dt_iop_module_t::gui_data, and IOP_GUI_FREE.
| void gui_init | ( | struct dt_iop_module_t * | self | ) |
References alignment_callback(), darktable_t::bauhaus, colorpick_color_set(), CPF_SPECIAL_FLAG, darktable, dt_accels_disconnect_on_text_input(), dt_bauhaus_combobox_from_params(), dt_bauhaus_combobox_new(), dt_bauhaus_slider_from_params(), dt_bauhaus_slider_set_digits(), dt_bauhaus_slider_set_format(), dt_bauhaus_slider_set_soft_max(), DT_BAUHAUS_SPACE, dt_color_picker_new(), DT_COLOR_PICKER_POINT, dt_conf_get_float(), dt_conf_get_string_const(), dt_free, dt_gui_container_first_child(), DT_GUI_MODULE, dt_loc_get_datadir(), dt_loc_get_user_config_dir(), DT_PIXEL_APPLY_DPI, dt_ui_label_new(), dt_ui_section_label_new(), dtgtk_button_new(), dtgtk_cairo_paint_alignment(), dtgtk_cairo_paint_refresh(), dtgtk_reset_label_new(), dtgtk_togglebutton_new(), FALSE, fontsel_callback(), g, i, IOP_GUI_ALLOC, p, dt_iop_module_t::params, PATH_MAX, refresh_callback(), refresh_watermarks(), text_callback(), tooltip, TRUE, watermark_callback(), and dt_iop_module_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.
References _combo_box_set_active_text(), FALSE, g, dt_iop_module_t::gui_data, i, p, dt_iop_module_t::params, and TRUE.
| void init | ( | dt_iop_module_t * | module | ) |
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 | ||
| ) |
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 | ||
| ) |
| 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
References d, dt_iop_module_t::default_params, DT_SCALE_IMAGE, and n.
|
static |
References dt_bauhaus_combobox_add(), dt_free, dt_free_gpointer(), extension(), and g.
Referenced by refresh_watermarks().
| const char * name | ( | ) |
| int operation_tags | ( | ) |
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 | ||
| ) |
References _watermark_get_svgdoc(), dt_iop_watermark_data_t::alignment, dt_dev_pixelpipe_iop_t::buf_in, darktable, dt_dev_pixelpipe_iop_t::data, dimension(), dt_free, dt_get_svg_dimension(), dt_iop_image_copy_by_size(), dt_loc_get_datadir(), dt_loc_get_user_config_dir(), 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_dev_pixelpipe_t::image, M_PI, dt_iop_watermark_data_t::opacity, out, PATH_MAX, darktable_t::plugin_threadsafe, dt_dev_pixelpipe_iop_t::roi_in, dt_dev_pixelpipe_iop_t::roi_out, dt_iop_watermark_data_t::rotate, dt_iop_roi_t::scale, dt_iop_watermark_data_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.
References refresh_watermarks().
Referenced by gui_init().
|
static |
References _combo_box_set_active_text(), dt_bauhaus_combobox_clear(), dt_free_gpointer(), dt_loc_get_datadir(), dt_loc_get_user_config_dir(), g, dt_iop_module_t::gui_data, load_watermarks(), p, dt_iop_module_t::params, PATH_MAX, and watermark_callback().
Referenced by gui_init(), and refresh_callback().
| void reload_defaults | ( | dt_iop_module_t * | module | ) |
References d.
References darktable, darktable_t::develop, dt_conf_set_string(), dt_dev_add_history_item, darktable_t::gui, p, dt_iop_module_t::params, dt_gui_gtk_t::reset, and TRUE.
Referenced by gui_init().
References _text_color_font_set_sensitive(), darktable, darktable_t::develop, dt_bauhaus_combobox_get(), dt_dev_add_history_item, g, darktable_t::gui, dt_iop_module_t::gui_data, n, p, dt_iop_module_t::params, dt_gui_gtk_t::reset, and TRUE.
Referenced by gui_init(), and refresh_watermarks().