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 "common/debug.h"
#include "common/darktable.h"
#include "common/dtpthread.h"
#include "common/image.h"
#include "control/settings.h"
#include "develop/imageop.h"
#include "develop/dev_history.h"
#include "develop/dev_pixelpipe.h"
+ Include dependency graph for develop.h:

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_pixelpipe_display_mask_t dt_dev_pixelpipe_display_mask_t
 
typedef enum dt_develop_detail_mmask_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_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_mmask_t {
  DT_DEV_DETAIL_MASK_NONE = 0 ,
  DT_DEV_DETAIL_MASK_REQUIRED = 1 ,
  DT_DEV_DETAIL_MASK_DEMOSAIC = 2 ,
  DT_DEV_DETAIL_MASK_RAWPREPARE = 4
}
 
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_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_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 .
 
void dt_dev_modulegroups_switch (dt_develop_t *dev, struct dt_iop_module_t *module)
 
void dt_dev_modulegroups_update_visibility (dt_develop_t *dev)
 
void dt_dev_reorder_gui_module_list (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)
 
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_dev_get_masks_group_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 (dt_develop_t *dev, 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 (dt_develop_t *dev, 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 (dt_develop_t *dev, struct dt_dev_pixelpipe_t *pipe, const double iop_order, const int transf_direction, float *points, size_t points_count)
 
struct dt_dev_pixelpipe_iop_tdt_dev_distort_get_iop_pipe (dt_develop_t *dev, 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 (scaling * natural_scale_on_processed_size * ppd)
 
float dt_dev_get_fit_scale (dt_develop_t *dev)
 Get the scale factor to fit the image into the darkroom area. (scaling * natural_scale_on_processed_size)
 
float dt_dev_get_zoom_level (const dt_develop_t *dev)
 
void dt_dev_reset_roi (dt_develop_t *dev)
 
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.
 

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))

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_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 

◆ 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 

◆ dt_dev_overexposed_colorscheme_t

Enumerator
DT_DEV_OVEREXPOSED_BLACKWHITE 
DT_DEV_OVEREXPOSED_REDBLUE 
DT_DEV_OVEREXPOSED_PURPLEGREEN 

◆ 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 

◆ 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 

◆ dt_dev_rawoverexposed_colorscheme_t

Enumerator
DT_DEV_RAWOVEREXPOSED_RED 
DT_DEV_RAWOVEREXPOSED_GREEN 
DT_DEV_RAWOVEREXPOSED_BLUE 
DT_DEV_RAWOVEREXPOSED_BLACK 

◆ dt_dev_rawoverexposed_mode_t

Enumerator
DT_DEV_RAWOVEREXPOSED_MODE_MARK_CFA 
DT_DEV_RAWOVEREXPOSED_MODE_MARK_SOLID 
DT_DEV_RAWOVEREXPOSED_MODE_FALSECOLOR 

◆ 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 

◆ dt_develop_detail_mmask_t

Enumerator
DT_DEV_DETAIL_MASK_NONE 
DT_DEV_DETAIL_MASK_REQUIRED 
DT_DEV_DETAIL_MASK_DEMOSAIC 
DT_DEV_DETAIL_MASK_RAWPREPARE 

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

References CLAMPF, darktable, dt_dev_get_processed_size(), dt_dev_get_zoom_level(), darktable_t::gui, dt_develop_t::height, dt_gui_gtk_t::ppd, dt_develop_t::roi, dt_develop_t::scaling, and dt_develop_t::width.

Referenced by _change_scaling(), _key_scroll(), _lib_navigation_draw_callback(), _lib_navigation_set_position(), _zoom_preset_change(), 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

References darktable, FALSE, darktable_t::gui, dt_develop_t::natural_scale, dt_gui_gtk_t::ppd, dt_develop_t::roi, dt_develop_t::scaling, and TRUE.

Referenced by _change_scaling().

◆ dt_dev_cleanup()

void dt_dev_cleanup ( dt_develop_t dev)

◆ 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

References dt_develop_t::border_size, dt_dev_get_overlay_scale(), FALSE, height, dt_develop_t::preview_height, dt_develop_t::preview_width, dt_develop_t::roi, TRUE, and width.

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

◆ 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()

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

◆ dt_dev_coordinates_image_norm_to_widget()

◆ dt_dev_coordinates_preview_abs_to_image_norm()

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

◆ 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)

References dt_dev_distort_transform_plus(), DT_DEV_TRANSFORM_DIR_ALL, and dt_develop_t::virtual_pipe.

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

◆ dt_dev_coordinates_raw_abs_to_raw_norm()

◆ dt_dev_coordinates_raw_norm_to_raw_abs()

◆ 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.

References darktable, dt_dev_get_zoom_level(), darktable_t::gui, i, dt_develop_t::orig_height, dt_develop_t::orig_width, dt_gui_gtk_t::ppd, dt_develop_t::processed_height, dt_develop_t::processed_width, dt_develop_t::roi, dt_develop_t::x, and dt_develop_t::y.

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_plus()

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

◆ dt_dev_distort_get_iop_pipe()

◆ dt_dev_distort_transform_locked()

int dt_dev_distort_transform_locked ( dt_develop_t dev,
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 ( dt_develop_t dev,
const struct dt_dev_pixelpipe_t pipe,
const double  iop_order,
const int  transf_direction,
float *  points,
size_t  points_count 
)

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

◆ dt_dev_ensure_image_storage()

◆ dt_dev_get_fit_scale()

float dt_dev_get_fit_scale ( dt_develop_t dev)

Get the scale factor to fit the image into the darkroom area. (scaling * natural_scale_on_processed_size)

Parameters
devthe develop instance
Returns
float : the fit scale factor

References dt_develop_t::height, dt_develop_t::preview_height, dt_develop_t::preview_width, dt_develop_t::roi, dt_develop_t::scaling, and dt_develop_t::width.

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

◆ dt_dev_get_history_hash()

◆ dt_dev_get_masks_group_name()

gchar * dt_dev_get_masks_group_name ( const struct dt_iop_module_t module)

Get the module multi name, or the module name if no multi name is provided

References dt_dev_get_multi_name(), dt_free, and dt_history_item_get_name().

Referenced by _blendop_masks_group_name_commit(), _set_group_name_from_module(), and dt_iop_gui_init_masks().

◆ 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

References dt_iop_module_t::multi_name.

Referenced by dt_dev_get_masks_group_name().

◆ 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 (scaling * natural_scale_on_processed_size * ppd)

Parameters
devthe develop instance
Returns
float :the overlay scale factor

References darktable, dt_dev_get_fit_scale(), darktable_t::gui, and dt_gui_gtk_t::ppd.

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

◆ dt_dev_get_processed_size()

◆ dt_dev_get_thumbnail_size()

◆ 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 
)
Todo:
: these are uint32_t, setting to -1 is confusing

References dt_develop_t::color_picker, dt_develop_t::colorscheme, dt_develop_t::display_histogram, dt_develop_t::display_samples, dt_conf_get_bool(), dt_conf_get_float(), dt_conf_get_int(), dt_dev_load_modules(), dt_dev_pixelpipe_gui_init(), dt_dev_pixelpipe_init(), dt_dev_pixelpipe_init_preview(), dt_dev_reset_roi(), dt_dev_set_backbuf(), dt_dev_set_history_hash(), dt_image_init(), DT_PIXELPIPE_CACHE_HASH_INVALID, dt_pthread_rwlock_init, dt_develop_t::gui_attached, dt_develop_t::height, dt_develop_t::histogram_pre_levels, dt_develop_t::histogram_pre_levels_max, dt_develop_t::histogram_pre_tonecurve, dt_develop_t::histogram_pre_tonecurve_max, 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::roi, dt_develop_t::threshold, TRUE, dt_develop_t::upper, dt_develop_t::virtual_pipe, dt_develop_t::wb_coeffs, dt_develop_t::wb_is_D65, and dt_develop_t::width.

Referenced by _history_compress_apply(), _history_copy_and_paste_on_image_merge(), _styles_init_source_dev(), dt_dev_merge_history_into_image(), 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

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

◆ dt_dev_load_image()

◆ dt_dev_load_modules()

◆ dt_dev_mask_history_overload()

guint dt_dev_mask_history_overload ( GList *  dev_history,
guint  threshold 
)

◆ dt_dev_masks_list_change()

void dt_dev_masks_list_change ( dt_develop_t dev)

◆ dt_dev_masks_list_remove()

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

◆ dt_dev_masks_list_update()

void dt_dev_masks_list_update ( dt_develop_t dev)

◆ dt_dev_masks_selection_change()

◆ dt_dev_masks_update_hash()

void dt_dev_masks_update_hash ( dt_develop_t dev)

◆ dt_dev_module_duplicate()

◆ dt_dev_module_remove()

◆ dt_dev_modulegroups_switch()

void dt_dev_modulegroups_switch ( dt_develop_t dev,
struct dt_iop_module_t module 
)

request modulegroups to show the group of the given module

References darktable, DT_DEBUG_CONTROL_SIGNAL_RAISE, DT_SIGNAL_DEVELOP_MODULEGROUPS_SET, and darktable_t::signals.

Referenced by _history_show_module_for_end(), and default_iop_focus().

◆ dt_dev_modulegroups_update_visibility()

void dt_dev_modulegroups_update_visibility ( dt_develop_t dev)

◆ dt_dev_modules_update_multishow()

◆ 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.

References _update_darkroom_roi(), FALSE, dt_develop_t::gui_attached, dt_develop_t::output_inited, dt_develop_t::pipe, dt_develop_t::preview_pipe, and dt_develop_t::roi.

◆ 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_reorder_gui_module_list()

void dt_dev_reorder_gui_module_list ( dt_develop_t dev)

◆ 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

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

Referenced by _build_preview_fallback_surface(), _darkroom_pickers_draw(), 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

References _dev_translate_roi(), darktable, dt_dev_get_zoom_level(), FALSE, darktable_t::gui, height, dt_gui_gtk_t::ppd, TRUE, and width.

Referenced by dt_masks_events_post_expose(), and gui_post_expose().

◆ dt_dev_reset_roi()

◆ 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()

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 
)

◆ dt_dev_set_history_hash()

◆ 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)

◆ 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

References 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)

◆ dt_masks_get_lock_mode()

◆ dt_masks_set_lock_mode()