Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
develop.h File Reference
#include <cairo.h>
#include <glib.h>
#include <inttypes.h>
#include <stddef.h>
#include <stdint.h>
#include "system/atomic.h"
#include "common/debug.h"
#include "common/logging.h"
#include "system/dtpthread.h"
#include "common/image.h"
#include "develop/imageop.h"
#include "develop/pixelpipe_hb.h"
#include "develop/dev_geometry.h"
#include "develop/dev_viewport.h"
#include "develop/dev_roi_request.h"
#include "develop/dev_history.h"
#include "develop/dev_pixelpipe.h"
+ Include dependency graph for develop.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  dt_develop_t
 

Macros

#define dt_dev_configure(dev, wd, ht)   DT_DEBUG_TRACE_WRAPPER(DT_DEBUG_DEV, dt_dev_configure_real, (dev), (wd), (ht))
 

Typedefs

typedef enum dt_dev_overexposed_colorscheme_t dt_dev_overexposed_colorscheme_t
 
typedef enum dt_dev_overlay_colors_t dt_dev_overlay_colors_t
 
typedef enum dt_dev_rawoverexposed_mode_t dt_dev_rawoverexposed_mode_t
 
typedef enum dt_dev_rawoverexposed_colorscheme_t dt_dev_rawoverexposed_colorscheme_t
 
typedef enum dt_dev_transform_direction_t dt_dev_transform_direction_t
 
typedef enum dt_dev_roi_space_t dt_dev_roi_space_t
 
typedef enum dt_dev_pixelpipe_display_mask_t dt_dev_pixelpipe_display_mask_t
 
typedef enum dt_develop_detail_mask_t dt_develop_detail_mask_t
 
typedef enum dt_clipping_preview_mode_t dt_clipping_preview_mode_t
 
typedef struct dt_develop_t dt_develop_t
 
typedef enum dt_dev_image_storage_t dt_dev_image_storage_t
 

Enumerations

enum  dt_dev_overexposed_colorscheme_t {
  DT_DEV_OVEREXPOSED_BLACKWHITE = 0 ,
  DT_DEV_OVEREXPOSED_REDBLUE = 1 ,
  DT_DEV_OVEREXPOSED_PURPLEGREEN = 2
}
 
enum  dt_dev_overlay_colors_t {
  DT_DEV_OVERLAY_GRAY = 0 ,
  DT_DEV_OVERLAY_RED = 1 ,
  DT_DEV_OVERLAY_GREEN = 2 ,
  DT_DEV_OVERLAY_YELLOW = 3 ,
  DT_DEV_OVERLAY_CYAN = 4 ,
  DT_DEV_OVERLAY_MAGENTA = 5
}
 
enum  dt_dev_rawoverexposed_mode_t {
  DT_DEV_RAWOVEREXPOSED_MODE_MARK_CFA = 0 ,
  DT_DEV_RAWOVEREXPOSED_MODE_MARK_SOLID = 1 ,
  DT_DEV_RAWOVEREXPOSED_MODE_FALSECOLOR = 2
}
 
enum  dt_dev_rawoverexposed_colorscheme_t {
  DT_DEV_RAWOVEREXPOSED_RED = 0 ,
  DT_DEV_RAWOVEREXPOSED_GREEN = 1 ,
  DT_DEV_RAWOVEREXPOSED_BLUE = 2 ,
  DT_DEV_RAWOVEREXPOSED_BLACK = 3
}
 
enum  dt_dev_transform_direction_t {
  DT_DEV_TRANSFORM_DIR_ALL = 0 ,
  DT_DEV_TRANSFORM_DIR_FORW_INCL = 1 ,
  DT_DEV_TRANSFORM_DIR_FORW_EXCL = 2 ,
  DT_DEV_TRANSFORM_DIR_BACK_INCL = 3 ,
  DT_DEV_TRANSFORM_DIR_BACK_EXCL = 4
}
 
enum  dt_dev_roi_space_t {
  DT_DEV_ROI_PIPELINE = 0 ,
  DT_DEV_ROI_GUI_LOGICAL = 1
}
 
enum  dt_dev_pixelpipe_display_mask_t {
  DT_DEV_PIXELPIPE_DISPLAY_NONE = 0 ,
  DT_DEV_PIXELPIPE_DISPLAY_MASK = 1 << 0 ,
  DT_DEV_PIXELPIPE_DISPLAY_CHANNEL = 1 << 1 ,
  DT_DEV_PIXELPIPE_DISPLAY_OUTPUT = 1 << 2 ,
  DT_DEV_PIXELPIPE_DISPLAY_L = 1 << 3 ,
  DT_DEV_PIXELPIPE_DISPLAY_a = 2 << 3 ,
  DT_DEV_PIXELPIPE_DISPLAY_b = 3 << 3 ,
  DT_DEV_PIXELPIPE_DISPLAY_R = 4 << 3 ,
  DT_DEV_PIXELPIPE_DISPLAY_G = 5 << 3 ,
  DT_DEV_PIXELPIPE_DISPLAY_B = 6 << 3 ,
  DT_DEV_PIXELPIPE_DISPLAY_GRAY = 7 << 3 ,
  DT_DEV_PIXELPIPE_DISPLAY_LCH_C = 8 << 3 ,
  DT_DEV_PIXELPIPE_DISPLAY_LCH_h = 9 << 3 ,
  DT_DEV_PIXELPIPE_DISPLAY_HSL_H = 10 << 3 ,
  DT_DEV_PIXELPIPE_DISPLAY_HSL_S = 11 << 3 ,
  DT_DEV_PIXELPIPE_DISPLAY_HSL_l = 12 << 3 ,
  DT_DEV_PIXELPIPE_DISPLAY_JzCzhz_Jz = 13 << 3 ,
  DT_DEV_PIXELPIPE_DISPLAY_JzCzhz_Cz = 14 << 3 ,
  DT_DEV_PIXELPIPE_DISPLAY_JzCzhz_hz = 15 << 3 ,
  DT_DEV_PIXELPIPE_DISPLAY_PASSTHRU = 16 << 3 ,
  DT_DEV_PIXELPIPE_DISPLAY_PASSTHRU_MONO = 17 << 3 ,
  DT_DEV_PIXELPIPE_DISPLAY_ANY = 0xff << 2 ,
  DT_DEV_PIXELPIPE_DISPLAY_STICKY = 1 << 16
}
 
enum  dt_develop_detail_mask_t {
  DT_DEV_DETAIL_MASK_NONE = 0 ,
  DT_DEV_DETAIL_MASK_ENABLED = 1
}
 
enum  dt_clipping_preview_mode_t {
  DT_CLIPPING_PREVIEW_GAMUT = 0 ,
  DT_CLIPPING_PREVIEW_ANYRGB = 1 ,
  DT_CLIPPING_PREVIEW_LUMINANCE = 2 ,
  DT_CLIPPING_PREVIEW_SATURATION = 3
}
 
enum  dt_dev_image_storage_t {
  DT_DEV_IMAGE_STORAGE_OK = 0 ,
  DT_DEV_IMAGE_STORAGE_MIPMAP_NOT_FOUND = 1 ,
  DT_DEV_IMAGE_STORAGE_DB_NOT_READ = 2
}
 

Functions

static uint64_t dt_dev_get_history_hash (const dt_develop_t *dev)
 
static void dt_dev_set_history_hash (dt_develop_t *dev, const uint64_t history_hash)
 
void dt_dev_init (dt_develop_t *dev, int32_t gui_attached)
 
void dt_dev_cleanup (dt_develop_t *dev)
 
GList * dt_dev_load_modules (dt_develop_t *dev)
 
dt_dev_image_storage_t dt_dev_ensure_image_storage (dt_develop_t *dev, const int32_t imgid)
 
void dt_dev_start_all_pipelines (dt_develop_t *dev)
 
dt_dev_image_storage_t dt_dev_load_image (dt_develop_t *dev, const int32_t imgid)
 
int dt_dev_is_current_image (dt_develop_t *dev, int32_t imgid)
 
void dt_dev_get_processed_size (const dt_develop_t *dev, int *procw, int *proch)
 
float dt_dev_get_zoom_scale (const dt_develop_t *dev, gboolean preview)
 
void dt_dev_set_backbuf (dt_backbuf_t *backbuf, const int width, const int height, const size_t bpp, const int64_t hash, const int64_t history_hash)
 
void dt_dev_coordinates_widget_to_image_norm (dt_develop_t *dev, float *points, size_t num_points)
 Coordinate conversion helpers between widget, normalized image, and absolute image spaces.
 
void dt_dev_coordinates_widget_delta_to_image_delta (dt_develop_t *dev, float *points, size_t num_points)
 Convert a widget-space distance to processed-image pixels.
 
void dt_dev_coordinates_image_norm_to_widget (dt_develop_t *dev, float *points, size_t num_points)
 
void dt_dev_coordinates_image_norm_to_image_abs (dt_develop_t *dev, float *points, size_t num_points)
 
void dt_dev_coordinates_image_abs_to_image_norm (dt_develop_t *dev, float *points, size_t num_points)
 
void dt_dev_coordinates_raw_abs_to_raw_norm (dt_develop_t *dev, float *points, size_t num_points)
 
void dt_dev_coordinates_raw_norm_to_raw_abs (dt_develop_t *dev, float *points, size_t num_points)
 
void dt_dev_coordinates_image_norm_to_raw_norm (dt_develop_t *dev, float *points, size_t num_points)
 
void dt_dev_coordinates_raw_norm_to_image_norm (dt_develop_t *dev, float *points, size_t num_points)
 
void dt_dev_coordinates_image_norm_to_preview_abs (dt_develop_t *dev, float *points, size_t num_points)
 
void dt_dev_coordinates_preview_abs_to_image_norm (dt_develop_t *dev, float *points, size_t num_points)
 
void dt_dev_coordinates_image_abs_to_raw_norm (dt_develop_t *dev, float *points, size_t num_points)
 
void dt_dev_retrieve_full_pos (dt_develop_t *dev, const int px, const int py, float *mouse_x, float *mouse_y)
 Get a point position from widget space to preview buffer space [0..1].
 
void dt_dev_configure_real (dt_develop_t *dev, int wd, int ht)
 
void dt_dev_check_zoom_pos_bounds (dt_develop_t *dev, float *dev_x, float *dev_y, float *box_w, float *box_h)
 Ensure that the current ROI position is within allowed bounds .
 
gboolean dt_dev_clamp_viewport_center (dt_develop_t *dev)
 Clamp the viewport centre against the box currently visible at this zoom.
 
void dt_dev_modulegroups_switch_tab (dt_develop_t *dev, struct dt_iop_module_t *module)
 
void dt_dev_signal_modules_moved (dt_develop_t *dev)
 
void dt_dev_snapshot_request (dt_develop_t *dev, const char *filename)
 
void dt_dev_masks_list_change (dt_develop_t *dev)
 
void dt_dev_masks_list_update (dt_develop_t *dev)
 
void dt_dev_masks_list_remove (dt_develop_t *dev, int formid, int parentid)
 
void dt_dev_masks_selection_change (dt_develop_t *dev, struct dt_iop_module_t *module, const int selectid, const int throw_event)
 
gboolean dt_dev_masks_manager_is_visible (dt_develop_t *dev)
 
void dt_dev_masks_update_hash (dt_develop_t *dev)
 
struct dt_iop_module_tdt_dev_module_duplicate (dt_develop_t *dev, struct dt_iop_module_t *base)
 
void dt_dev_module_remove (dt_develop_t *dev, struct dt_iop_module_t *module)
 
void dt_dev_modules_update_multishow (dt_develop_t *dev)
 
gchar * dt_dev_get_multi_name (const struct dt_iop_module_t *module)
 
gchar * dt_history_item_get_name (const struct dt_iop_module_t *module)
 
gchar * dt_history_item_get_name_html (const struct dt_iop_module_t *module)
 
gchar * dt_history_item_get_label (const struct dt_iop_module_t *module)
 
int dt_dev_coordinates_raw_abs_to_image_abs (dt_develop_t *dev, float *points, size_t points_count)
 
int dt_dev_coordinates_image_abs_to_raw_abs (dt_develop_t *dev, float *points, size_t points_count)
 
int dt_dev_distort_transform_plus (const struct dt_dev_pixelpipe_t *pipe, const double iop_order, const int transf_direction, float *points, size_t points_count)
 
int dt_dev_distort_transform_locked (const struct dt_dev_pixelpipe_t *pipe, const double iop_order, const int transf_direction, float *points, size_t points_count)
 
int dt_dev_distort_backtransform_plus (const struct dt_dev_pixelpipe_t *pipe, const double iop_order, const int transf_direction, float *points, size_t points_count)
 
int dt_dev_distort_transform_gui (struct dt_develop_t *dev, const double iop_order, const int transf_direction, float *points, size_t points_count)
 GUI-side bounded transform folds. Ask the geometry service, fall back to the pixel-less pipe. Same iop_order bound and direction modes as dt_dev_distort_transform_plus().
 
int dt_dev_distort_backtransform_gui (struct dt_develop_t *dev, const double iop_order, const int transf_direction, float *points, size_t points_count)
 The inverse of dt_dev_distort_transform_gui(), same rules.
 
gboolean dt_dev_module_geometry_gui (struct dt_develop_t *dev, struct dt_iop_module_t *module, dt_iop_roi_t *in, dt_iop_roi_t *out)
 One module's own input and output rectangles at full resolution, from the geometry service.
 
gboolean dt_dev_processed_size_gui (struct dt_develop_t *dev, int *width, int *height)
 The developed image's full-resolution size for a GUI caller: the geometry service, then the published record, in that order of freshness. FALSE when neither has one.
 
struct dt_dev_pixelpipe_iop_tdt_dev_distort_get_iop_pipe (struct dt_dev_pixelpipe_t *pipe, struct dt_iop_module_t *module)
 
void dt_dev_undo_start_record (dt_develop_t *dev)
 
void dt_dev_undo_end_record (dt_develop_t *dev)
 
gboolean dt_masks_get_lock_mode (dt_develop_t *dev)
 
void dt_masks_set_lock_mode (dt_develop_t *dev, gboolean mode)
 
guint dt_dev_mask_history_overload (GList *dev_history, guint threshold)
 
void dt_dev_append_changed_tag (const int32_t imgid)
 
float dt_dev_get_natural_scale (dt_develop_t *dev)
 
int dt_dev_get_thumbnail_size (dt_develop_t *dev)
 
gboolean dt_dev_pixelpipe_has_preview_output (const dt_develop_t *dev, const struct dt_dev_pixelpipe_t *pipe, const struct dt_iop_roi_t *roi)
 Tell whether a GUI-attached pipe currently targets the darkroom preview-sized output.
 
gboolean dt_dev_pipelines_share_preview_output (dt_develop_t *dev)
 Tell whether the darkroom main and preview pipes currently target the same GUI output.
 
float dt_dev_get_overlay_scale (dt_develop_t *dev)
 Get the overlay scale factor in GUI logical coordinates.
 
float dt_dev_get_widget_zoom_scale (const dt_develop_t *dev, float scaling)
 Convert a darkroom scaling factor to GUI logical zoom.
 
void dt_dev_get_widget_center (const dt_develop_t *dev, float *point)
 Get the center of the darkroom widget in logical coordinates.
 
void dt_dev_get_image_box_in_widget (const dt_develop_t *dev, int32_t width, int32_t height, float *box)
 Get the displayed image rectangle in darkroom widget coordinates.
 
float dt_dev_get_fit_scale (dt_develop_t *dev)
 Get the scale factor that maps preview-buffer pixels to GUI coordinates.
 
float dt_dev_get_zoom_level (const dt_develop_t *dev)
 
void dt_dev_reset_roi (dt_develop_t *dev)
 
void dt_dev_convert_roi (const dt_develop_t *dev, const dt_iop_roi_t *roi_in, dt_iop_roi_t *roi_out, const dt_dev_roi_space_t from, const dt_dev_roi_space_t to)
 Convert a full ROI object between pipeline raster coordinates and GUI logical coordinates.
 
gboolean dt_dev_clip_roi (dt_develop_t *dev, cairo_t *cr, int32_t width, int32_t height)
 Clip the view to the ROI. WARNING: this must be done before any translation.
 
gboolean dt_dev_rescale_roi (dt_develop_t *dev, cairo_t *cr, int32_t width, int32_t height)
 Scale the ROI to fit within given width/height, centered.
 
gboolean dt_dev_rescale_roi_to_input (dt_develop_t *dev, cairo_t *cr, int32_t width, int32_t height)
 Scale the ROI to fit the input size within given width/height, centered.
 
gboolean dt_dev_check_zoom_scale_bounds (dt_develop_t *dev)
 Ensure that the current zoom level is within allowed bounds (for scrolling).
 
void dt_dev_update_mouse_effect_radius (dt_develop_t *dev)
 Convert absolute output-image coordinates to input image space by calling dt_dev_coordinates_image_abs_to_raw_abs() directly, then normalize with dt_dev_coordinates_raw_abs_to_raw_norm() when normalized raw coordinates are required.
 
struct dt_develop_tdt_dev_get_global (void)
 
void dt_dev_set_global (struct dt_develop_t *dev)
 

Macro Definition Documentation

◆ dt_dev_configure

#define dt_dev_configure (   dev,
  wd,
  ht 
)    DT_DEBUG_TRACE_WRAPPER(DT_DEBUG_DEV, dt_dev_configure_real, (dev), (wd), (ht))

Definition at line 591 of file develop.h.

Typedef Documentation

◆ dt_clipping_preview_mode_t

◆ dt_dev_image_storage_t

◆ dt_dev_overexposed_colorscheme_t

◆ dt_dev_overlay_colors_t

◆ dt_dev_pixelpipe_display_mask_t

◆ dt_dev_rawoverexposed_colorscheme_t

◆ dt_dev_rawoverexposed_mode_t

◆ dt_dev_roi_space_t

◆ dt_dev_transform_direction_t

◆ dt_develop_detail_mask_t

◆ dt_develop_t

typedef struct dt_develop_t dt_develop_t

Enumeration Type Documentation

◆ dt_clipping_preview_mode_t

Enumerator
DT_CLIPPING_PREVIEW_GAMUT 
DT_CLIPPING_PREVIEW_ANYRGB 
DT_CLIPPING_PREVIEW_LUMINANCE 
DT_CLIPPING_PREVIEW_SATURATION 

Definition at line 153 of file develop.h.

◆ dt_dev_image_storage_t

Enumerator
DT_DEV_IMAGE_STORAGE_OK 
DT_DEV_IMAGE_STORAGE_MIPMAP_NOT_FOUND 
DT_DEV_IMAGE_STORAGE_DB_NOT_READ 

Definition at line 512 of file develop.h.

◆ dt_dev_overexposed_colorscheme_t

Enumerator
DT_DEV_OVEREXPOSED_BLACKWHITE 
DT_DEV_OVEREXPOSED_REDBLUE 
DT_DEV_OVEREXPOSED_PURPLEGREEN 

Definition at line 75 of file develop.h.

◆ dt_dev_overlay_colors_t

Enumerator
DT_DEV_OVERLAY_GRAY 
DT_DEV_OVERLAY_RED 
DT_DEV_OVERLAY_GREEN 
DT_DEV_OVERLAY_YELLOW 
DT_DEV_OVERLAY_CYAN 
DT_DEV_OVERLAY_MAGENTA 

Definition at line 82 of file develop.h.

◆ dt_dev_pixelpipe_display_mask_t

Enumerator
DT_DEV_PIXELPIPE_DISPLAY_NONE 
DT_DEV_PIXELPIPE_DISPLAY_MASK 
DT_DEV_PIXELPIPE_DISPLAY_CHANNEL 
DT_DEV_PIXELPIPE_DISPLAY_OUTPUT 
DT_DEV_PIXELPIPE_DISPLAY_L 
DT_DEV_PIXELPIPE_DISPLAY_a 
DT_DEV_PIXELPIPE_DISPLAY_b 
DT_DEV_PIXELPIPE_DISPLAY_R 
DT_DEV_PIXELPIPE_DISPLAY_G 
DT_DEV_PIXELPIPE_DISPLAY_B 
DT_DEV_PIXELPIPE_DISPLAY_GRAY 
DT_DEV_PIXELPIPE_DISPLAY_LCH_C 
DT_DEV_PIXELPIPE_DISPLAY_LCH_h 
DT_DEV_PIXELPIPE_DISPLAY_HSL_H 
DT_DEV_PIXELPIPE_DISPLAY_HSL_S 
DT_DEV_PIXELPIPE_DISPLAY_HSL_l 
DT_DEV_PIXELPIPE_DISPLAY_JzCzhz_Jz 
DT_DEV_PIXELPIPE_DISPLAY_JzCzhz_Cz 
DT_DEV_PIXELPIPE_DISPLAY_JzCzhz_hz 
DT_DEV_PIXELPIPE_DISPLAY_PASSTHRU 
DT_DEV_PIXELPIPE_DISPLAY_PASSTHRU_MONO 
DT_DEV_PIXELPIPE_DISPLAY_ANY 
DT_DEV_PIXELPIPE_DISPLAY_STICKY 

Definition at line 120 of file develop.h.

◆ dt_dev_rawoverexposed_colorscheme_t

Enumerator
DT_DEV_RAWOVEREXPOSED_RED 
DT_DEV_RAWOVEREXPOSED_GREEN 
DT_DEV_RAWOVEREXPOSED_BLUE 
DT_DEV_RAWOVEREXPOSED_BLACK 

Definition at line 98 of file develop.h.

◆ dt_dev_rawoverexposed_mode_t

Enumerator
DT_DEV_RAWOVEREXPOSED_MODE_MARK_CFA 
DT_DEV_RAWOVEREXPOSED_MODE_MARK_SOLID 
DT_DEV_RAWOVEREXPOSED_MODE_FALSECOLOR 

Definition at line 92 of file develop.h.

◆ dt_dev_roi_space_t

Enumerator
DT_DEV_ROI_PIPELINE 
DT_DEV_ROI_GUI_LOGICAL 

Definition at line 114 of file develop.h.

◆ dt_dev_transform_direction_t

Enumerator
DT_DEV_TRANSFORM_DIR_ALL 
DT_DEV_TRANSFORM_DIR_FORW_INCL 
DT_DEV_TRANSFORM_DIR_FORW_EXCL 
DT_DEV_TRANSFORM_DIR_BACK_INCL 
DT_DEV_TRANSFORM_DIR_BACK_EXCL 

Definition at line 105 of file develop.h.

◆ dt_develop_detail_mask_t

Enumerator
DT_DEV_DETAIL_MASK_NONE 
DT_DEV_DETAIL_MASK_ENABLED 

Definition at line 147 of file develop.h.

Function Documentation

◆ dt_dev_append_changed_tag()

void dt_dev_append_changed_tag ( const int32_t  imgid)

◆ dt_dev_check_zoom_pos_bounds()

void dt_dev_check_zoom_pos_bounds ( dt_develop_t dev,
float *  dev_x,
float *  dev_y,
float *  box_w,
float *  box_h 
)

Ensure that the current ROI position is within allowed bounds .

Parameters
devthe develop instance
dev_xthe normalized x position of ROI
dev_ythe normalized y position of ROI
box_wthe width of navigation's box
box_hthe height of navigation's box

Definition at line 1074 of file develop.c.

References CLAMPF, dt_dev_get_processed_size(), dt_dev_get_zoom_level(), dt_dev_viewport_box_height(), dt_dev_viewport_box_width(), dt_dev_viewport_scaling(), and IS_NULL_PTR.

Referenced by _darkroom_edge_pan_apply(), _lib_navigation_draw_callback(), _lib_navigation_set_position(), dt_dev_clamp_viewport_center(), and mouse_moved().

◆ dt_dev_check_zoom_scale_bounds()

gboolean dt_dev_check_zoom_scale_bounds ( dt_develop_t dev)

Ensure that the current zoom level is within allowed bounds (for scrolling).

Parameters
devthe develop instance
Returns
gboolean TRUE if the zoom level was adjusted, FALSE otherwise

Definition at line 2091 of file develop.c.

References dt_dev_roi_request_natural_scale(), dt_dev_viewport_scaling(), dt_dev_viewport_set_scaling(), FALSE, scaling, and TRUE.

Referenced by _change_scaling().

◆ dt_dev_clamp_viewport_center()

gboolean dt_dev_clamp_viewport_center ( dt_develop_t dev)

Clamp the viewport centre against the box currently visible at this zoom.

Clamp the viewport centre against the box visible at the current zoom. Returns TRUE when the centre moved.

Four call sites used to hand dt_dev_check_zoom_pos_bounds() the addresses of the centre fields and let it write through them. Nothing may hold a pointer into the viewport now – it publishes whole states – so the read/clamp/publish round trip lives here once instead of being spelled out at each site.

Returns
TRUE when the clamp actually moved the centre.

Definition at line 1065 of file develop.c.

References dt_dev_viewport_state_t::center_x, dt_dev_viewport_state_t::center_y, dt_dev_check_zoom_pos_bounds(), dt_dev_viewport_get(), and dt_dev_viewport_set_center().

Referenced by _change_scaling(), _key_scroll(), _zoom_preset_change(), and dt_masks_center_view_on_form().

◆ dt_dev_cleanup()

void dt_dev_cleanup ( dt_develop_t dev)

Definition at line 237 of file develop.c.

References dt_develop_t::alliop, dt_develop_t::blend_params, dt_develop_t::chroma_adaptation, dt_develop_t::color_picker, dt_develop_t::colorscheme, dt_conf_set_float(), dt_conf_set_int(), dt_dev_free_history_item(), dt_dev_history_drop_pending_commits(), dt_dev_pixelpipe_cleanup(), dt_dev_viewport_free(), dt_free, dt_free_gpointer(), dt_geometry_chain_free(), dt_gui_throttle_cancel(), dt_iop_cleanup_module(), dt_masks_release_all_forms(), dt_pthread_mutex_destroy(), dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), dt_pthread_rwlock_destroy(), dt_pthread_rwlock_unlock(), dt_pthread_rwlock_wrlock(), dt_develop_t::geometry_chain, dt_develop_t::gui_attached, dt_develop_t::history, dt_develop_t::history_mutex, dt_develop_t::iop, dt_develop_t::iop_order_list, IS_NULL_PTR, dt_develop_t::lower, dt_develop_t::masks_mutex, dt_develop_t::mode, dt_develop_t::overexposed, dt_develop_t::params, dt_develop_t::pipe, dt_develop_t::preview_pipe, dt_develop_t::primary_sample, dt_develop_t::proxy, dt_develop_t::rawoverexposed, dt_develop_t::threshold, dt_develop_t::transient_params, dt_develop_t::transient_params_mutex, dt_develop_t::undo_history_before_end, dt_develop_t::undo_history_before_iop_order_list, dt_develop_t::undo_history_before_snapshot, dt_develop_t::undo_history_depth, dt_develop_t::upper, dt_develop_t::viewport, and dt_develop_t::wb_coeffs.

Referenced by _engine_free(), _history_compress_apply(), _history_copy_and_paste_on_image_merge(), cleanup(), dt_dev_merge_history_into_image(), dt_dev_snapshot_capture(), dt_focus_draw_clusters(), dt_imageio_export_with_flags(), and dt_styles_apply_to_image_merge().

◆ dt_dev_clip_roi()

gboolean dt_dev_clip_roi ( dt_develop_t dev,
cairo_t *  cr,
int32_t  width,
int32_t  height 
)

Clip the view to the ROI. WARNING: this must be done before any translation.

Parameters
devthe develop instance
crthe cairo context to clip on
widththe view width
heightthe view height
Returns
gboolean TRUE if the image dimension are 0x0

Definition at line 2028 of file develop.c.

References dt_dev_get_overlay_scale(), dt_dev_roi_request_preview_height(), dt_dev_roi_request_preview_width(), dt_dev_viewport_border_size(), FALSE, height, TRUE, and width.

Referenced by expose(), expose(), and gui_post_expose().

◆ dt_dev_configure_real()

◆ dt_dev_convert_roi()

void dt_dev_convert_roi ( const dt_develop_t dev,
const dt_iop_roi_t roi_in,
dt_iop_roi_t roi_out,
const dt_dev_roi_space_t  from,
const dt_dev_roi_space_t  to 
)

Convert a full ROI object between pipeline raster coordinates and GUI logical coordinates.

The pipeline stores ROI geometry in real buffer pixels while Gtk events and drawing use logical coordinates. x/y/width/height cross that boundary through the ppd factor, while roi->scale remains the same because it expresses image-space sampling, not GUI density.

Parameters
devthe develop instance carrying the ppd factor
roi_inthe source ROI
roi_outthe converted ROI
fromthe source coordinate space
tothe destination coordinate space

Definition at line 2006 of file develop.c.

References DT_DEV_ROI_GUI_LOGICAL, DT_DEV_ROI_PIPELINE, dt_gui_get_global(), factor, dt_iop_roi_t::height, IS_NULL_PTR, dt_gui_gtk_t::ppd, dt_iop_roi_t::scale, dt_iop_roi_t::width, dt_iop_roi_t::x, and dt_iop_roi_t::y.

Referenced by dt_dev_configure_real().

◆ dt_dev_coordinates_image_abs_to_image_norm()

void dt_dev_coordinates_image_abs_to_image_norm ( dt_develop_t dev,
float *  points,
size_t  num_points 
)

◆ dt_dev_coordinates_image_abs_to_raw_abs()

int dt_dev_coordinates_image_abs_to_raw_abs ( dt_develop_t dev,
float *  points,
size_t  points_count 
)

◆ dt_dev_coordinates_image_abs_to_raw_norm()

◆ dt_dev_coordinates_image_norm_to_image_abs()

void dt_dev_coordinates_image_norm_to_image_abs ( dt_develop_t dev,
float *  points,
size_t  num_points 
)

◆ dt_dev_coordinates_image_norm_to_preview_abs()

◆ dt_dev_coordinates_image_norm_to_raw_norm()

◆ dt_dev_coordinates_image_norm_to_widget()

◆ dt_dev_coordinates_preview_abs_to_image_norm()

◆ dt_dev_coordinates_raw_abs_to_image_abs()

int dt_dev_coordinates_raw_abs_to_image_abs ( dt_develop_t dev,
float *  points,
size_t  points_count 
)

apply all transforms to the specified points (in virtual preview-pipe space)

Definition at line 1765 of file develop.c.

References DT_DEV_TRANSFORM_DIR_ALL, and dt_geometry_transform().

Referenced by _circle_get_points(), _ellipse_get_points(), _gradient_get_points(), dt_dev_coordinates_raw_norm_to_image_norm(), and dt_masks_center_view_on_form().

◆ dt_dev_coordinates_raw_abs_to_raw_norm()

void dt_dev_coordinates_raw_abs_to_raw_norm ( dt_develop_t dev,
float *  points,
size_t  num_points 
)

◆ dt_dev_coordinates_raw_norm_to_image_norm()

◆ dt_dev_coordinates_raw_norm_to_raw_abs()

◆ dt_dev_coordinates_widget_delta_to_image_delta()

void dt_dev_coordinates_widget_delta_to_image_delta ( dt_develop_t dev,
float *  points,
size_t  num_points 
)

Convert a widget-space distance to processed-image pixels.

Mouse drags and GUI handle sizes are expressed in darkroom logical pixels. Interactive modules compare them against image data, so this helper applies the current widget zoom once in the develop API instead of duplicating the same division in every callback.

Parameters
devthe develop instance
pointspointer to num_points delta pairs stored as {dx, dy}; data is modified in place.
num_pointsnumber of delta pairs referenced by points.

Definition at line 1127 of file develop.c.

References dt_dev_get_zoom_level(), dt_gui_get_global(), i, IS_NULL_PTR, and dt_gui_gtk_t::ppd.

Referenced by _darkroom_edge_pan_apply(), button_pressed(), key_pressed(), and mouse_moved().

◆ dt_dev_coordinates_widget_to_image_norm()

void dt_dev_coordinates_widget_to_image_norm ( dt_develop_t dev,
float *  points,
size_t  num_points 
)

Coordinate conversion helpers between widget, normalized image, and absolute image spaces.

Widget space is assumed to be the darkroom center view and doesn't account for borders, zooming, panning, etc. RAW space is the full-resolution input fed to the pipeline. Image space is the output image resulting from applying a full history over the full-resolution input. Preview space is the downscaled output image preview as displayed in darkroom.

Parameters
devdevelop instance
pointspointer to num_points coordinate pairs stored as {x, y}; data is modified in place.
num_pointsnumber of coordinate pairs referenced by points.

Definition at line 1144 of file develop.c.

References dt_dev_geometry_snapshot(), dt_dev_get_zoom_level(), dt_dev_viewport_center_x(), dt_dev_viewport_center_y(), dt_dev_viewport_widget_height(), dt_dev_viewport_widget_width(), dt_gui_get_global(), geometry, i, IS_NULL_PTR, and dt_gui_gtk_t::ppd.

Referenced by _dt_masks_events_set_current_pos(), button_pressed(), button_pressed(), button_released(), dt_drawlayer_widget_points_to_layer_coords(), get_point_scale(), gui_post_expose(), mouse_moved(), mouse_moved(), and scrolled().

◆ dt_dev_distort_backtransform_gui()

int dt_dev_distort_backtransform_gui ( struct dt_develop_t dev,
const double  iop_order,
const int  transf_direction,
float *  points,
size_t  points_count 
)

◆ dt_dev_distort_backtransform_plus()

int dt_dev_distort_backtransform_plus ( const struct dt_dev_pixelpipe_t pipe,
const double  iop_order,
const int  transf_direction,
float *  points,
size_t  points_count 
)

same fct as dt_dev_coordinates_image_abs_to_raw_abs, but we can specify iop with priority between pmin and pmax.

◆ dt_dev_distort_get_iop_pipe()

struct dt_dev_pixelpipe_iop_t * dt_dev_distort_get_iop_pipe ( struct dt_dev_pixelpipe_t pipe,
struct dt_iop_module_t module 
)

get the iop_pixelpipe instance corresponding to the iop in the given pipe

Definition at line 1833 of file develop.c.

References dt_dev_pixelpipe_t::nodes.

Referenced by _build_pre_module_filter_string(), _create_background_layer_from_input(), _current_preview_hash(), and _current_preview_luminance_hash().

◆ dt_dev_distort_transform_gui()

int dt_dev_distort_transform_gui ( dt_develop_t dev,
const double  iop_order,
const int  transf_direction,
float *  points,
size_t  points_count 
)

GUI-side bounded transform folds. Ask the geometry service, fall back to the pixel-less pipe. Same iop_order bound and direction modes as dt_dev_distort_transform_plus().

The only way a GUI asks for a composed transform.

GUI-side bounded transform folds. Ask the geometry service, fall back to the pixel-less pipe. Same iop_order bound and direction modes as dt_dev_distort_transform_plus().

Same contract as dt_dev_distort_transform_plus() – the iop_order bound and the five direction modes mean exactly what they mean there – but stated in terms of the dev rather than a pipe, because a GUI has no pipe of its own to name. It used to fall back to a pixel-less clone of the pipeline when the chain could not answer; that clone is deleted, so a chain that cannot answer returns 0 and leaves points untouched.

Definition at line 1691 of file develop.c.

References dt_geometry_transform(), and IS_NULL_PTR.

Referenced by _draw_retrieve_lines_from_params(), _iop_clipping_set_max_clip(), _set_max_clip(), button_pressed(), dt_drawlayer_layer_points_to_widget_coords(), dt_masks_distort_transform(), dt_masks_points_shift_to_source(), get_points(), gui_post_expose(), and set_points_from_grad().

◆ dt_dev_distort_transform_locked()

int dt_dev_distort_transform_locked ( const struct dt_dev_pixelpipe_t pipe,
const double  iop_order,
const int  transf_direction,
float *  points,
size_t  points_count 
)

same fct, but can only be called from a distort_transform function called by dt_dev_distort_transform_plus

◆ dt_dev_distort_transform_plus()

int dt_dev_distort_transform_plus ( const struct dt_dev_pixelpipe_t pipe,
const double  iop_order,
const int  transf_direction,
float *  points,
size_t  points_count 
)

reverse apply all transforms to the specified points (in virtual preview-pipe space), but we can specify iop with priority between pmin and pmax. in/out as dt_dev_coordinates_raw_abs_to_image_abs

◆ dt_dev_ensure_image_storage()

◆ dt_dev_get_fit_scale()

float dt_dev_get_fit_scale ( dt_develop_t dev)

Get the scale factor that maps preview-buffer pixels to GUI coordinates.

The pipeline ROI is stored in raster pixels. GUI drawing still happens in Gtk logical coordinates, so this helper exposes the explicit raster-to-GUI conversion used by overlays.

Parameters
devthe develop instance
Returns
float : the fit scale factor

Definition at line 1953 of file develop.c.

References dt_dev_viewport_scaling(), dt_gui_get_global(), IS_NULL_PTR, and dt_gui_gtk_t::ppd.

Referenced by _darkroom_pickers_draw(), button_pressed(), dt_dev_get_overlay_scale(), and dt_dev_rescale_roi().

◆ dt_dev_get_global()

struct dt_develop_t * dt_dev_get_global ( void  )

The darkroom's current dt_develop_t, owned by the application orchestrator. Declared here rather than reached through darktable.develop so that modules and libraries do not have to include darktable.h – and therefore the whole application – just to find the image being edited. Implemented in darktable.c. Returns NULL outside darkroom.

Definition at line 528 of file darktable.c.

References darktable, and darktable_t::develop.

Referenced by _add_masks_history_item(), _add_sample(), _autoset_popover_preshow(), _background_layer_job_done_idle(), _bin_pixels_waveform(), _bin_vectorscope(), _center_view_free_zoom(), _color_picker_callback_button_press(), _color_picker_new(), _color_picker_widget_destroy(), _create_vectorscope_image(), _darkroom_autoset_quickbutton_clicked(), _darkroom_image_loaded_callback(), _darkroom_pickers_draw(), _darkroom_sample_raw_box_to_image_norm(), _darkroom_sample_raw_point_to_image_norm(), _display_samples_changed(), _doc_screenshot_iop_modules(), _find_previous_history_step(), _focus_next_control(), _focus_next_module(), _focus_previous_control(), _focus_previous_module(), _get_backbuf_source_piece(), _get_live_histogram_hash(), _groups_naming_form(), _gui_changed_callback(), _gui_styles_dialog_run(), _histogram_refresh_idle(), _history_apply_history_end(), _history_show_module_for_end(), _iop_color_picker_cacheline_ready_callback(), _iop_color_picker_history_resync_callback(), _iop_color_picker_pipe_finished_callback(), _iop_dim_all_but(), _iop_ensure_visible(), _iop_reset_label_reset(), _ioporder_apply_preset(), _ioporder_drag_motion(), _ioporder_get_current_order_name(), _ioporder_get_preview_piece(), _ioporder_graph_draw(), _ioporder_module_in_history(), _ioporder_rebuild_graph(), _ioporder_runtime_band_profile_info(), _is_form_used(), _is_module_in_history(), _lib_duplicate_delete(), _lib_duplicate_init_callback(), _lib_duplicate_thumb_press_callback(), _lib_history_change_callback(), _lib_history_view_selection_changed(), _lib_navigation_draw_callback(), _lib_navigation_history_resync_callback(), _lib_navigation_set_position(), _lib_snapshots_add_button_clicked_callback(), _live_sample_button(), _menu_append_existing_shapes(), _menu_append_join_group(), _modchooser_run(), _module_is_current(), _modulegroups_clear_drop_state(), _modulegroups_drag_motion(), _modulegroups_reorder_target(), _modulegroups_switch_tab_next(), _modulegroups_switch_tab_previous(), _modulegroups_sync_section_label_margins(), _modules_owning_group(), _orient_scope_buf(), _picker_sample_box(), _pixelpipe_pick_from_image(), _pixelpipe_pick_samples(), _pop_undo(), _preview_cacheline_ready_callback(), _preview_history_resync_callback(), _preview_pipe_finished(), _process_histogram(), _process_vectorscope(), _record_point_area(), _refresh_global_picker(), _refresh_preview_module_histogram_for_hash(), _remove_sample(), _remove_sample_cb(), _resolve_backbuf_sampling_source(), _restrict_histogram_changed(), _row_can_be_added(), _sample_enter_callback(), _sample_leave_callback(), _sample_raw_box_to_image_norm(), _sample_raw_point_to_image_norm(), _scope_pixel_to_display_rgb(), _scope_pixel_to_xyz(), _set_params(), _set_stage(), _shape_manager_handler_callback(), _shape_manager_list_recurs(), _shape_manager_recreate_list(), _shape_manager_shape_button_started(), _shape_manager_update_item(), _statistic_changed(), _studio_history_changed_callback(), _studio_set_image(), _styles_apply_callback(), _sync_pending_histogram_hashes(), _toggle_side_borders_accel_callback(), _tooltip_add_text(), _tooltip_assign_text(), _tree_add_exist(), _tree_add_shape(), _tree_add_to_group(), _tree_append_row(), _tree_apply_operation(), _tree_cell_edited(), _tree_context_menu(), _tree_delete_shape(), _tree_delete_unused(), _tree_duplicate_shape(), _tree_format_form_usage_label(), _tree_group(), _tree_movedown(), _tree_moveup(), _tree_row_action(), _tree_row_add_to_group(), _tree_row_assign_to_modules(), _tree_selection_change(), _tree_store_add_forms(), _ui_scroll_target_is_live_widget(), _update_everything(), _update_foreach(), _update_iop_visibility(), _zoom_preset_change(), button_pressed(), button_pressed(), button_released(), button_released(), clear_caches_callback(), compress_history_callback(), copy_callback(), copy_parts_callback(), delete_history_callback(), dt_dev_history_is_image_in_dev(), dt_dev_load_image(), dt_dev_snapshot_capture(), dt_focus_draw_clusters(), dt_gui_presets_apply_preset(), dt_image_flip(), dt_iop_cleanup_module(), dt_iop_color_picker_get_active_cst(), dt_iop_color_picker_get_ready_data(), dt_iop_color_picker_request_update(), dt_iop_color_picker_reset(), dt_iop_color_picker_set_cst(), dt_iop_get_colorout_module(), dt_iop_get_module(), dt_iop_request_focus(), dt_ioppr_change_iop_order(), dt_lib_colorpicker_set_box_area(), dt_lib_colorpicker_set_point(), duplicate_callback(), enter(), expose(), full_screen_callback(), get_params(), gui_cleanup(), gui_init(), gui_post_expose(), gui_reset(), leave(), load_xmp_callback(), mouse_moved(), mouse_moved(), new_history_callback(), paste_all_callback(), paste_parts_callback(), and set_params().

◆ dt_dev_get_history_hash()

◆ dt_dev_get_image_box_in_widget()

void dt_dev_get_image_box_in_widget ( const dt_develop_t dev,
int32_t  width,
int32_t  height,
float *  box 
)

Get the displayed image rectangle in darkroom widget coordinates.

Input callbacks often need to know whether the pointer is inside the image or in the margin area. This exposes the current displayed backbuffer footprint in logical coordinates, including the ppd conversion.

Parameters
devthe develop instance
widththe current darkroom widget width
heightthe current darkroom widget height
boxreturned image box stored as {x, y, width, height}

Definition at line 1977 of file develop.c.

References dt_dev_roi_request_preview_height(), dt_dev_roi_request_preview_width(), dt_dev_viewport_border_size(), dt_dev_viewport_scaling(), dt_gui_get_global(), height, IS_NULL_PTR, dt_gui_gtk_t::ppd, and width.

Referenced by _build_preview_fallback_surface(), _darkroom_edge_pan_update_state(), gui_post_expose(), and mouse_in_imagearea().

◆ dt_dev_get_multi_name()

gchar * dt_dev_get_multi_name ( const struct dt_iop_module_t module)

generates item multi-instance name without mnemonics

Definition at line 1637 of file develop.c.

References dt_iop_module_t::multi_name.

Referenced by _ioporder_create_graph_node(), and dt_masks_group_name_for_module().

◆ dt_dev_get_natural_scale()

◆ dt_dev_get_overlay_scale()

float dt_dev_get_overlay_scale ( dt_develop_t dev)

Get the overlay scale factor in GUI logical coordinates.

This is the GUI-space scale used to draw preview overlays from the raster backbuffer dimensions stored in the pipeline ROI.

Parameters
devthe develop instance
Returns
float :the overlay scale factor

Definition at line 1959 of file develop.c.

References dt_dev_get_fit_scale().

Referenced by _draw_near_point(), button_pressed(), dt_dev_clip_roi(), dt_drawlayer_compute_view_patch(), expose(), expose(), gui_post_expose(), gui_post_expose(), and mouse_moved().

◆ dt_dev_get_processed_size()

◆ dt_dev_get_thumbnail_size()

◆ dt_dev_get_widget_center()

void dt_dev_get_widget_center ( const dt_develop_t dev,
float *  point 
)

Get the center of the darkroom widget in logical coordinates.

Parameters
devthe develop instance
pointreturned widget center stored as {x, y}

Definition at line 1970 of file develop.c.

References dt_dev_viewport_widget_height(), dt_dev_viewport_widget_width(), and IS_NULL_PTR.

Referenced by _change_scaling(), and key_pressed().

◆ dt_dev_get_widget_zoom_scale()

float dt_dev_get_widget_zoom_scale ( const dt_develop_t dev,
float  scaling 
)

Convert a darkroom scaling factor to GUI logical zoom.

Pipeline zoom is tracked in raster-space units. Gtk callbacks and overlay drawing operate in logical widget coordinates, so the ppd correction belongs here rather than at every interactive call site.

Parameters
devthe develop instance
scalingthe darkroom scaling factor to evaluate
Returns
float : the GUI logical zoom

Definition at line 1964 of file develop.c.

References dt_dev_roi_request_natural_scale(), dt_gui_get_global(), IS_NULL_PTR, dt_gui_gtk_t::ppd, and scaling.

Referenced by _change_scaling().

◆ dt_dev_get_zoom_level()

◆ dt_dev_get_zoom_scale()

◆ dt_dev_init()

void dt_dev_init ( dt_develop_t dev,
int32_t  gui_attached 
)

Definition at line 143 of file develop.c.

References dt_develop_t::color_picker, dt_develop_t::colorscheme, dt_develop_t::display_histogram, dt_develop_t::display_samples, DT_CLIPPING_PREVIEW_GAMUT, DT_CLIPPING_PREVIEW_SATURATION, dt_conf_get_bool(), dt_conf_get_float(), dt_conf_get_int(), dt_dev_geometry_init(), dt_dev_load_modules(), DT_DEV_OVEREXPOSED_BLACKWHITE, DT_DEV_OVEREXPOSED_PURPLEGREEN, DT_DEV_OVEREXPOSED_REDBLUE, dt_dev_pixelpipe_init(), dt_dev_pixelpipe_init_preview(), DT_DEV_RAWOVEREXPOSED_BLACK, DT_DEV_RAWOVEREXPOSED_MODE_FALSECOLOR, DT_DEV_RAWOVEREXPOSED_MODE_MARK_CFA, DT_DEV_RAWOVEREXPOSED_RED, dt_dev_reset_roi(), dt_dev_roi_request_init(), dt_dev_set_backbuf(), dt_dev_set_history_hash(), dt_dev_viewport_new(), dt_geometry_chain_new(), dt_image_init(), DT_PIXELPIPE_CACHE_HASH_INVALID, dt_pthread_mutex_init(), dt_pthread_rwlock_init(), dt_pthread_rwlock_set_name(), dt_develop_t::geometry_chain, dt_develop_t::gui_attached, dt_develop_t::history_mutex, dt_develop_t::image_storage, dt_develop_t::iop, dt_develop_t::live_samples_enabled, dt_develop_t::lower, dt_develop_t::masks_mutex, dt_develop_t::mode, dt_develop_t::output_histogram, dt_develop_t::overexposed, dt_develop_t::pipe, dt_develop_t::preview_pipe, dt_develop_t::primary_sample, dt_develop_t::proxy, dt_develop_t::raw_histogram, dt_develop_t::rawoverexposed, dt_develop_t::restrict_histogram, dt_develop_t::threshold, dt_develop_t::transient_params_mutex, TRUE, dt_develop_t::upper, dt_develop_t::viewport, dt_develop_t::wb_coeffs, and dt_develop_t::wb_is_D65.

Referenced by _history_compress_apply(), _history_copy_and_paste_on_image_merge(), _styles_init_source_dev(), dt_dev_merge_history_into_image(), dt_dev_snapshot_capture(), dt_focus_draw_clusters(), dt_imageio_export_with_flags(), and init().

◆ dt_dev_is_current_image()

int dt_dev_is_current_image ( dt_develop_t dev,
int32_t  imgid 
)

checks if provided imgid is the image currently in develop

Definition at line 1323 of file develop.c.

References dt_image_t::id, and dt_develop_t::image_storage.

◆ dt_dev_load_image()

◆ dt_dev_load_modules()

GList * dt_dev_load_modules ( dt_develop_t dev)

◆ dt_dev_mask_history_overload()

guint dt_dev_mask_history_overload ( GList *  dev_history,
guint  threshold 
)

Definition at line 1497 of file dev_history.c.

References dt_dev_history_item_t::forms, and threshold.

Referenced by dt_dev_history_notify_change().

◆ dt_dev_masks_list_change()

void dt_dev_masks_list_change ( dt_develop_t dev)

Definition at line 1340 of file develop.c.

References dt_develop_t::list_change, dt_develop_t::masks, and dt_develop_t::proxy.

Referenced by dt_dev_read_history_ext().

◆ dt_dev_masks_list_remove()

void dt_dev_masks_list_remove ( dt_develop_t dev,
int  formid,
int  parentid 
)

Definition at line 1350 of file develop.c.

References dt_develop_t::list_remove, dt_develop_t::masks, and dt_develop_t::proxy.

◆ dt_dev_masks_list_update()

void dt_dev_masks_list_update ( dt_develop_t dev)

◆ dt_dev_masks_manager_is_visible()

gboolean dt_dev_masks_manager_is_visible ( dt_develop_t dev)

Definition at line 1334 of file develop.c.

References dt_develop_t::is_visible, dt_develop_t::masks, and dt_develop_t::proxy.

Referenced by expose().

◆ dt_dev_masks_selection_change()

◆ dt_dev_masks_update_hash()

◆ dt_dev_module_duplicate()

◆ dt_dev_module_geometry_gui()

gboolean dt_dev_module_geometry_gui ( struct dt_develop_t dev,
struct dt_iop_module_t module,
dt_iop_roi_t in,
dt_iop_roi_t out 
)

One module's own input and output rectangles at full resolution, from the geometry service.

Replaces resolving a piece and reading piece->buf_in / piece->buf_out. Returns FALSE when the service has none, leaving the out-params untouched – a disabled or absent module has no rectangles, and a caller that draws anyway draws somewhere arbitrary.

Definition at line 1751 of file develop.c.

References dt_geometry_chain_authoritative(), dt_geometry_chain_find(), FALSE, dt_develop_t::geometry_chain, dt_geometry_record_t::in, IS_NULL_PTR, dt_iop_module_t::multi_priority, dt_iop_module_t::op, out, dt_geometry_record_t::out, and TRUE.

Referenced by _aspect_ratio_get(), _commit_box(), _iop_clipping_set_max_clip(), _lens_corrections_available(), _ratio_get_aspect(), _set_max_clip(), button_pressed(), commit_box(), do_crop(), dt_drawlayer_raw_placement_gui(), gui_post_expose(), mouse_moved(), set_grad_from_points(), and set_points_from_grad().

◆ dt_dev_module_remove()

◆ dt_dev_modulegroups_switch_tab()

void dt_dev_modulegroups_switch_tab ( dt_develop_t dev,
struct dt_iop_module_t module 
)

request modulegroups to show the group of the given module

Definition at line 1328 of file develop.c.

References dt_control_signal_get_global(), DT_DEBUG_CONTROL_SIGNAL_RAISE, DT_SIGNAL_DEVELOP_MODULEGROUPS_SET, and IS_NULL_PTR.

Referenced by dt_iop_request_focus().

◆ dt_dev_modules_update_multishow()

void dt_dev_modules_update_multishow ( dt_develop_t dev)

same, but for all modules

Todo:
: this function should just disappear, as it mixes concepts from multi-instances from before

Definition at line 1545 of file develop.c.

References _dev_module_update_multishow(), dt_dev_get_history_end_ext(), dt_iop_gui_module_is_visible(), dt_ioppr_check_iop_order(), dt_develop_t::history, dt_iop_module_t::instance, dt_dev_multishow_state_t::instance_counts, dt_develop_t::iop, key, and state.

Referenced by _update_iop_visibility().

◆ dt_dev_pipelines_share_preview_output()

gboolean dt_dev_pipelines_share_preview_output ( dt_develop_t dev)

Tell whether the darkroom main and preview pipes currently target the same GUI output.

When both pipes would render the same geometry, preview must run first so the main pipe can reuse its backbuffer instead of recomputing the same image concurrently.

Definition at line 504 of file develop.c.

References _update_darkroom_roi(), dt_dev_roi_request_valid(), FALSE, dt_develop_t::gui_attached, IS_NULL_PTR, dt_develop_t::pipe, and dt_develop_t::preview_pipe.

Referenced by expose().

◆ dt_dev_pixelpipe_has_preview_output()

gboolean dt_dev_pixelpipe_has_preview_output ( const dt_develop_t dev,
const struct dt_dev_pixelpipe_t pipe,
const struct dt_iop_roi_t roi 
)

Tell whether a GUI-attached pipe currently targets the darkroom preview-sized output.

GUI modules must no longer assume that dev->preview_pipe is the only pipe producing the full-image downsampled preview. When the main pipe renders the same geometry, it must follow the same heuristics.

Pass roi when the caller already knows the current output ROI for this processing run. Pass NULL to fall back to the pipe backbuffer size from the last completed run.

◆ dt_dev_processed_size_gui()

gboolean dt_dev_processed_size_gui ( dt_develop_t dev,
int *  width,
int *  height 
)

The developed image's full-resolution size for a GUI caller: the geometry service, then the published record, in that order of freshness. FALSE when neither has one.

The developed image's full-resolution size for a GUI caller: the geometry service, then the published record, in that order of freshness. FALSE when neither has one.

What a module GUI used to get by resolving its piece on a pixel-less clone of the pipeline and reading piece->buf_in / piece->buf_out. Those rectangles are a product of the size fold, and the geometry service performs that fold over records for EVERY module – not only the ones that change geometry, because not only those read the result: iop/graduatednd.c has no geometry callbacks at all and normalises its overlay against its own output rectangle.

Returns
FALSE when the service cannot answer, in which case in and out are untouched and the caller must not draw. A module that is disabled or absent has no rectangles.

The developed image's full-resolution size, for a GUI caller.

Two sources, in order of freshness, which is why this exists rather than a plain read of the geometry record: the chain is recomputed the moment the module stack changes, while the record is only republished when the size path runs. Code that needed the newest answer used to reach into a pipe's processed_width field to get it, and had to keep its own fallback for the case where that pipe had none.

Returns
FALSE when no source has a usable size, leaving the out-params untouched.

Definition at line 1730 of file develop.c.

References dt_dev_geometry_snapshot(), dt_geometry_chain_authoritative(), dt_geometry_chain_processed_size(), FALSE, geometry, dt_develop_t::geometry_chain, height, IS_NULL_PTR, TRUE, and width.

◆ dt_dev_rescale_roi()

gboolean dt_dev_rescale_roi ( dt_develop_t dev,
cairo_t *  cr,
int32_t  width,
int32_t  height 
)

Scale the ROI to fit within given width/height, centered.

Parameters
devthe develop instance
crthe cairo context to draw on
widththe widget width
heightthe widget height
Returns
gboolean TRUE if the image dimension are 0x0

Definition at line 2071 of file develop.c.

References _dev_translate_roi(), dt_dev_get_fit_scale(), FALSE, height, TRUE, and width.

Referenced by _darkroom_pickers_draw(), expose(), expose(), and gui_post_expose().

◆ dt_dev_rescale_roi_to_input()

gboolean dt_dev_rescale_roi_to_input ( dt_develop_t dev,
cairo_t *  cr,
int32_t  width,
int32_t  height 
)

Scale the ROI to fit the input size within given width/height, centered.

Parameters
devthe develop instance
crthe cairo context to draw on
widththe widget width
heightthe widget height
Returns
gboolean TRUE if the image dimension are 0x0

Definition at line 2081 of file develop.c.

References _dev_translate_roi(), dt_dev_get_zoom_level(), dt_gui_get_global(), FALSE, height, dt_gui_gtk_t::ppd, TRUE, and width.

Referenced by _overlay_apply_transform(), and gui_post_expose().

◆ dt_dev_reset_roi()

void dt_dev_reset_roi ( dt_develop_t dev)

Definition at line 1998 of file develop.c.

References dt_dev_viewport_reset().

Referenced by dt_dev_init(), and reset().

◆ dt_dev_retrieve_full_pos()

void dt_dev_retrieve_full_pos ( dt_develop_t dev,
const int  px,
const int  py,
float *  mouse_x,
float *  mouse_y 
)

Get a point position from widget space to preview buffer space [0..1].

NOTE: The input point coordinates are without border subtraction.

Parameters
devthe develop instance
pxthe x point coordinate in widget space, with no border subtraction.
pythe y point coordinate in widget space, with no border subtraction.
mouse_xthe returned x point coordinate relative to processed image [0..1].
mouse_ythe returned y point coordinate relative to processed image [0..1].

◆ dt_dev_set_backbuf()

◆ dt_dev_set_global()

void dt_dev_set_global ( struct dt_develop_t dev)

Publish dev as the live darkroom develop. Only the views that own that lifetime call this: darkroom's enter(), and studio_capture's enter()/leave() swap. Pass NULL to clear. Does NOT take ownership.

Definition at line 543 of file darktable.c.

References darktable, and darktable_t::develop.

Referenced by enter(), init(), and leave().

◆ dt_dev_set_history_hash()

◆ dt_dev_signal_modules_moved()

void dt_dev_signal_modules_moved ( dt_develop_t dev)

◆ dt_dev_snapshot_request()

void dt_dev_snapshot_request ( dt_develop_t dev,
const char *  filename 
)

◆ dt_dev_start_all_pipelines()

◆ dt_dev_undo_end_record()

◆ dt_dev_undo_start_record()

◆ dt_dev_update_mouse_effect_radius()

void dt_dev_update_mouse_effect_radius ( dt_develop_t dev)

Convert absolute output-image coordinates to input image space by calling dt_dev_coordinates_image_abs_to_raw_abs() directly, then normalize with dt_dev_coordinates_raw_abs_to_raw_norm() when normalized raw coordinates are required.

Definition at line 2117 of file develop.c.

References DT_DEBUG_MASKS, dt_dev_get_zoom_level(), DT_PIXEL_APPLY_DPI, dt_print(), dt_screen_ppd(), dt_widget_mouse_radius(), and dt_widget_set_mouse_radius().

Referenced by dt_dev_get_thumbnail_size(), and dt_dev_pixelpipe_change_zoom_main().

◆ dt_history_item_get_label()

gchar * dt_history_item_get_label ( const struct dt_iop_module_t module)

generate item multi-instance name with mnemonics, for Gtk labels

Definition at line 1613 of file develop.c.

References dt_free, and dt_iop_module_t::multi_name.

Referenced by _iop_panel_label().

◆ dt_history_item_get_name()

◆ dt_history_item_get_name_html()

gchar * dt_history_item_get_name_html ( const struct dt_iop_module_t module)

Definition at line 1661 of file develop.c.

References delete_underscore(), dt_free, and dt_iop_module_t::multi_name.

◆ dt_masks_get_lock_mode()

gboolean dt_masks_get_lock_mode ( dt_develop_t dev)

◆ dt_masks_set_lock_mode()

void dt_masks_set_lock_mode ( dt_develop_t dev,
gboolean  mode 
)