![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
Include dependency graph for coordinates.c:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Functions | |
| static gboolean | _flip_swaps_axes (dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe) |
| Does the orientation flip.c settled on swap the axes? | |
| gboolean | dt_drawlayer_layer_canvas_for_pipe (dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, int *width, int *height) |
| gboolean | dt_drawlayer_layer_canvas (dt_iop_module_t *self, int *width, int *height) |
| dt_drawlayer_layer_canvas_for_pipe for a GUI caller. | |
| gboolean | dt_drawlayer_raw_placement_for_frame (dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, const dt_iop_roi_t *const frame, dt_drawlayer_raw_placement_t *placement) |
| gboolean | dt_drawlayer_raw_placement_gui (dt_iop_module_t *self, dt_drawlayer_raw_placement_t *placement, int *frame_width, int *frame_height) |
| The placement against this module's frame, as the GUI sees it. | |
| static gboolean | _virtual_piece_layer_geometry (dt_iop_module_t *self, int *layer_width, int *layer_height) |
| gboolean | dt_drawlayer_widget_points_to_layer_coords (dt_iop_module_t *self, float *pts, const int count) |
| gboolean | dt_drawlayer_layer_points_to_widget_coords (dt_iop_module_t *self, float *pts, const int count) |
| gboolean | dt_drawlayer_widget_to_layer_coords (dt_iop_module_t *self, const double wx, const double wy, float *lx, float *ly) |
| gboolean | dt_drawlayer_layer_to_widget_coords (dt_iop_module_t *self, const float x, const float y, float *wx, float *wy) |
| gboolean | dt_drawlayer_layer_bounds_to_widget_bounds (dt_iop_module_t *self, const float x0, const float y0, const float x1, const float y1, float *left, float *top, float *right, float *bottom) |
| float | dt_drawlayer_widget_brush_radius (dt_iop_module_t *self, const dt_drawlayer_brush_dab_t *dab, const float fallback) |
| float | dt_drawlayer_current_live_padding (dt_iop_module_t *self) |
| gboolean | dt_drawlayer_compute_view_patch (dt_iop_module_t *self, const float padding, drawlayer_view_patch_info_t *view) |
|
static |
Does the orientation flip.c settled on swap the axes?
Asked of the SIZE FOLD, not of the EXIF tag: a raw's recorded orientation is not always right, and iop/flip.c exists precisely so the user can override it. Its _flip_resolve() merges the two, and what this reads – the rect flip's own fold maps its input to – is the consequence of that merge. So a corrected orientation is honoured with no access to flip's private data and no second copy of the merge rule.
Read from flip's record on the GUI side and from flip's piece on a pipe, which are the same fold run by the two sides; nothing else in the pipe transposes. The focused-module exception cannot disturb it either: flip is tagged IOP_TAG_DISTORT and no module's operation_tags_filter() suppresses that tag – crop filters DECORATION, ashift DECORATION|CLIPPING.
A disabled flip folds its input to itself, so the answer is FALSE, which is what an orientation of NONE means. A square frame cannot express a swap, and does not need to: the canvas has the same dimensions either way.
Definition at line 50 of file coordinates.c.
References dt_dev_pixelpipe_iop_t::buf_in, dt_dev_pixelpipe_iop_t::buf_out, dt_dev_pixelpipe_iop_t::data, dt_iop_module_t::dev, dt_geometry_chain_find(), FALSE, dt_develop_t::geometry_chain, dt_iop_roi_t::height, dt_geometry_record_t::in, IS_NULL_PTR, dt_dev_pixelpipe_t::nodes, out, dt_geometry_record_t::out, TRUE, and dt_iop_roi_t::width.
Referenced by dt_drawlayer_layer_canvas_for_pipe().
|
static |
Definition at line 163 of file coordinates.c.
References dt_drawlayer_layer_canvas().
Referenced by dt_drawlayer_compute_view_patch().
| gboolean dt_drawlayer_compute_view_patch | ( | dt_iop_module_t * | self, |
| const float | padding, | ||
| drawlayer_view_patch_info_t * | view | ||
| ) |
Definition at line 304 of file coordinates.c.
References _virtual_piece_layer_geometry(), dt_iop_module_t::dev, dt_dev_get_overlay_scale(), dt_dev_roi_request_preview_height(), dt_dev_roi_request_preview_width(), dt_dev_viewport_border_size(), dt_dev_viewport_widget_height(), dt_dev_viewport_widget_width(), dt_drawlayer_widget_points_to_layer_coords(), FALSE, i, IS_NULL_PTR, MAX, MIN, and view.
Referenced by _ensure_widget_cache().
| float dt_drawlayer_current_live_padding | ( | dt_iop_module_t * | self | ) |
Definition at line 294 of file coordinates.c.
References _conf_brush_shape(), _conf_hardness(), _conf_size(), and dt_drawlayer_brush_dab_t::radius.
Referenced by _fill_runtime_inputs().
| gboolean dt_drawlayer_layer_bounds_to_widget_bounds | ( | dt_iop_module_t * | self, |
| const float | x0, | ||
| const float | y0, | ||
| const float | x1, | ||
| const float | y1, | ||
| float * | left, | ||
| float * | top, | ||
| float * | right, | ||
| float * | bottom | ||
| ) |
Definition at line 247 of file coordinates.c.
References dt_drawlayer_layer_points_to_widget_coords(), FALSE, i, IS_NULL_PTR, top, and TRUE.
Referenced by _ensure_widget_cache().
| gboolean dt_drawlayer_layer_canvas | ( | dt_iop_module_t * | self, |
| int * | width, | ||
| int * | height | ||
| ) |
dt_drawlayer_layer_canvas_for_pipe for a GUI caller.
Definition at line 106 of file coordinates.c.
References dt_drawlayer_layer_canvas_for_pipe(), height, and width.
Referenced by _virtual_piece_layer_geometry().
| gboolean dt_drawlayer_layer_canvas_for_pipe | ( | dt_iop_module_t * | self, |
| const dt_dev_pixelpipe_t * | pipe, | ||
| int * | width, | ||
| int * | height | ||
| ) |
Definition at line 83 of file coordinates.c.
References _flip_swaps_axes(), dt_iop_module_t::dev, dt_dev_geometry_get_raw_size(), FALSE, height, IS_NULL_PTR, swap(), TRUE, and width.
Referenced by __attribute__(), dt_drawlayer_layer_canvas(), and dt_drawlayer_raw_placement_for_frame().
| gboolean dt_drawlayer_layer_points_to_widget_coords | ( | dt_iop_module_t * | self, |
| float * | pts, | ||
| const int | count | ||
| ) |
Definition at line 195 of file coordinates.c.
References dt_iop_module_t::dev, dt_dev_coordinates_image_norm_to_preview_abs(), dt_dev_coordinates_image_norm_to_widget(), dt_dev_coordinates_preview_abs_to_image_norm(), dt_dev_distort_transform_gui(), DT_DEV_TRANSFORM_DIR_FORW_EXCL, dt_drawlayer_raw_placement_gui(), FALSE, i, dt_iop_module_t::iop_order, IS_NULL_PTR, dt_drawlayer_raw_placement_t::offset_x, dt_drawlayer_raw_placement_t::offset_y, and TRUE.
Referenced by dt_drawlayer_layer_bounds_to_widget_bounds(), dt_drawlayer_layer_to_widget_coords(), and dt_drawlayer_widget_brush_radius().
| gboolean dt_drawlayer_layer_to_widget_coords | ( | dt_iop_module_t * | self, |
| const float | x, | ||
| const float | y, | ||
| float * | wx, | ||
| float * | wy | ||
| ) |
Definition at line 235 of file coordinates.c.
References dt_drawlayer_layer_points_to_widget_coords(), FALSE, IS_NULL_PTR, TRUE, and x.
Referenced by _paint_layer_to_widget_cb().
| gboolean dt_drawlayer_raw_placement_for_frame | ( | dt_iop_module_t * | self, |
| const dt_dev_pixelpipe_t * | pipe, | ||
| const dt_iop_roi_t *const | frame, | ||
| dt_drawlayer_raw_placement_t * | placement | ||
| ) |
Definition at line 111 of file coordinates.c.
References dt_drawlayer_layer_canvas_for_pipe(), FALSE, dt_iop_roi_t::height, IS_NULL_PTR, dt_drawlayer_raw_placement_t::offset_x, dt_drawlayer_raw_placement_t::offset_y, TRUE, dt_drawlayer_raw_placement_t::valid, dt_iop_roi_t::width, dt_iop_roi_t::x, and dt_iop_roi_t::y.
Referenced by dt_drawlayer_raw_placement_gui().
| gboolean dt_drawlayer_raw_placement_gui | ( | dt_iop_module_t * | self, |
| dt_drawlayer_raw_placement_t * | placement, | ||
| int * | frame_width, | ||
| int * | frame_height | ||
| ) |
The placement against this module's frame, as the GUI sees it.
Definition at line 147 of file coordinates.c.
References dt_iop_module_t::dev, dt_dev_module_geometry_gui(), dt_drawlayer_raw_placement_for_frame(), FALSE, dt_iop_roi_t::height, IS_NULL_PTR, and dt_iop_roi_t::width.
Referenced by dt_drawlayer_layer_points_to_widget_coords(), and dt_drawlayer_widget_points_to_layer_coords().
| float dt_drawlayer_widget_brush_radius | ( | dt_iop_module_t * | self, |
| const dt_drawlayer_brush_dab_t * | dab, | ||
| const float | fallback | ||
| ) |
Definition at line 277 of file coordinates.c.
References dt_iop_module_t::dev, dt_drawlayer_layer_points_to_widget_coords(), IS_NULL_PTR, dt_drawlayer_brush_dab_t::radius, dt_drawlayer_brush_dab_t::x, and dt_drawlayer_brush_dab_t::y.
Referenced by gui_post_expose().
| gboolean dt_drawlayer_widget_points_to_layer_coords | ( | dt_iop_module_t * | self, |
| float * | pts, | ||
| const int | count | ||
| ) |
Definition at line 168 of file coordinates.c.
References dt_iop_module_t::dev, dt_dev_coordinates_image_norm_to_preview_abs(), dt_dev_coordinates_preview_abs_to_image_norm(), dt_dev_coordinates_widget_to_image_norm(), dt_dev_distort_backtransform_gui(), DT_DEV_TRANSFORM_DIR_FORW_EXCL, dt_drawlayer_raw_placement_gui(), FALSE, i, dt_iop_module_t::iop_order, IS_NULL_PTR, dt_drawlayer_raw_placement_t::offset_x, dt_drawlayer_raw_placement_t::offset_y, and TRUE.
Referenced by dt_drawlayer_compute_view_patch(), and dt_drawlayer_widget_to_layer_coords().
| gboolean dt_drawlayer_widget_to_layer_coords | ( | dt_iop_module_t * | self, |
| const double | wx, | ||
| const double | wy, | ||
| float * | lx, | ||
| float * | ly | ||
| ) |
Definition at line 222 of file coordinates.c.
References dt_drawlayer_widget_points_to_layer_coords(), FALSE, IS_NULL_PTR, and TRUE.
Referenced by _fill_input_layer_coords(), dt_drawlayer_build_worker_input_dab(), and gui_post_expose().