![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
Objective facts about the image a dev is working on. More...
#include <dev_geometry.h>
Collaboration diagram for dt_dev_image_geometry_t:Data Fields | |
| int32_t | raw_width |
| int32_t | raw_height |
| int32_t | processed_width |
| int32_t | processed_height |
| gboolean | raw_inited |
| gboolean | processed_inited |
Objective facts about the image a dev is working on.
This is not GUI state, and the distinction is not academic. Every field here is needed with no GUI at all: export, thumbnail generation and dev_snapshot's frozen dev all resolve drawn-mask geometry against the raw dimensions, and the darkroom worker feeds them to dt_dev_pixelpipe_set_input() on every loop tick.
Leaving them at zero does not fail loudly. dt_dev_coordinates_raw_norm_to_raw_abs() early-returns on raw_width == 0 WITHOUT transforming, so a shape's normalized centre masquerades as absolute pixel coordinates and every mask on the image collapses to within a few hundred pixels of the origin. That shipped once, because these fields were mistaken for GUI state and written only if(dev->gui_attached). See CLAUDE.md, and do not gate dt_dev_geometry_set_raw_size() on anything.
Definition at line 44 of file dev_geometry.h.
| int32_t dt_dev_image_geometry_t::processed_height |
Definition at line 51 of file dev_geometry.h.
Referenced by __attribute__(), _darkroom_pipeline_inputs_ready(), _do_get_structure_quad(), _picker_get_module_bounds_image_norm(), _picker_initialize_geometry_raw(), _virtual_piece_layer_geometry(), button_pressed(), button_released(), dt_dev_coordinates_image_abs_to_image_norm(), dt_dev_coordinates_image_norm_to_image_abs(), dt_dev_coordinates_image_norm_to_widget(), dt_dev_coordinates_widget_to_image_norm(), dt_dev_geometry_get_processed_size(), dt_dev_geometry_processed_height(), dt_dev_geometry_set_processed_size(), dt_dev_get_processed_size(), dt_dev_get_zoom_scale(), dt_dev_roi_request_publish(), gui_post_expose(), and mouse_moved().
| gboolean dt_dev_image_geometry_t::processed_inited |
TRUE once the processed pair has been published from the virtual pipe. There is no headless producer for it today, so a caller that gets FALSE must not read 0x0 as though it were an answer – that is the raw_width mistake, one field over.
Definition at line 59 of file dev_geometry.h.
Referenced by dt_dev_geometry_get_processed_size(), dt_dev_geometry_set_processed_size(), and dt_dev_roi_request_publish().
| int32_t dt_dev_image_geometry_t::processed_width |
Dimensions of the final processed image if it were processed full-resolution: the final aspect ratio, with all cropping and distortions taken into account.
Definition at line 51 of file dev_geometry.h.
Referenced by __attribute__(), _darkroom_pipeline_inputs_ready(), _do_get_structure_quad(), _picker_get_module_bounds_image_norm(), _picker_initialize_geometry_raw(), _virtual_piece_layer_geometry(), button_pressed(), button_released(), dt_dev_coordinates_image_abs_to_image_norm(), dt_dev_coordinates_image_norm_to_image_abs(), dt_dev_coordinates_image_norm_to_widget(), dt_dev_coordinates_widget_to_image_norm(), dt_dev_geometry_get_processed_size(), dt_dev_geometry_processed_width(), dt_dev_geometry_set_processed_size(), dt_dev_get_processed_size(), dt_dev_get_zoom_scale(), dt_dev_roi_request_publish(), gui_post_expose(), and mouse_moved().
| int32_t dt_dev_image_geometry_t::raw_height |
Definition at line 47 of file dev_geometry.h.
Referenced by _brush_events_mouse_moved(), _brush_events_post_expose(), _circle_get_points(), _circle_get_points_source(), _darkroom_pipeline_inputs_ready(), _delete_current_layer(), _ellipse_get_points(), _ellipse_get_points_source(), _gradient_draw_shape(), _gradient_get_points(), _gradient_get_pts_border(), _polygon_events_mouse_moved(), _rename_current_layer_from_gui(), dt_dev_coordinates_raw_abs_to_raw_norm(), dt_dev_coordinates_raw_norm_to_raw_abs(), dt_dev_darkroom_pipeline(), dt_dev_geometry_get_raw_size(), dt_dev_geometry_raw_height(), dt_dev_geometry_set_raw_size(), dt_dev_get_thumbnail_size(), dt_drawlayer_ensure_layer_cache(), dt_masks_calculate_source_pos_origin(), and dt_masks_set_source_pos_initial_value().
| gboolean dt_dev_image_geometry_t::raw_inited |
TRUE once the raw pair has been published from a successful mipmap read.
Definition at line 54 of file dev_geometry.h.
Referenced by dt_dev_geometry_get_raw_size(), dt_dev_geometry_raw_inited(), dt_dev_geometry_set_raw_size(), and dt_dev_roi_request_publish().
| int32_t dt_dev_image_geometry_t::raw_width |
Dimensions of the full-resolution RAW image being worked on.
Definition at line 47 of file dev_geometry.h.
Referenced by _brush_events_mouse_moved(), _brush_events_post_expose(), _circle_get_points(), _circle_get_points_source(), _darkroom_pipeline_inputs_ready(), _delete_current_layer(), _ellipse_get_points(), _ellipse_get_points_source(), _gradient_draw_shape(), _gradient_get_points(), _gradient_get_pts_border(), _polygon_events_mouse_moved(), _rename_current_layer_from_gui(), dt_dev_coordinates_raw_abs_to_raw_norm(), dt_dev_coordinates_raw_norm_to_raw_abs(), dt_dev_darkroom_pipeline(), dt_dev_geometry_get_raw_size(), dt_dev_geometry_raw_width(), dt_dev_geometry_set_raw_size(), dt_dev_get_thumbnail_size(), dt_drawlayer_ensure_layer_cache(), dt_masks_calculate_source_pos_origin(), and dt_masks_set_source_pos_initial_value().