![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
Where the raw-anchored layer canvas sits in this module's own frame. More...
#include <coordinates.h>
Collaboration diagram for dt_drawlayer_raw_placement_t:Data Fields | |
| int | offset_x |
| int | offset_y |
| gboolean | valid |
Where the raw-anchored layer canvas sits in this module's own frame.
The layer has the RAW image's dimensions and sits at the origin of the raw frame. The module's own frame is a window into it, at the position the size fold gives that window. That is the whole placement: an offset, never a scale, never a rotation.
It follows from what the layer is FOR. Paint is authored on the sensor's frame, so it must not move when the frame around it changes – crop it tighter, or move the crop without resizing it, and the same paint stays on the same content, cropped along with it. Uncropped, the two frames coincide and so do their centres.
The layer is deliberately IMMUNE to perspective correction and to horizon rotation. Those change what the frame contains, not where the sensor's centre is, and following them would mean warping a four-channel raster through the upstream chain on every render.
The one transform that does apply is the FLIP. A raw buffer is landscape, so a portrait image is a raw rotated 90 degrees, and the layer is rotated with it – carried here by the canvas being stated in the module's own orientation (dt_drawlayer_layer_canvas), which is what the user paints on and what the sidecar holds.
Definition at line 47 of file coordinates.h.
| int dt_drawlayer_raw_placement_t::offset_x |
Definition at line 49 of file coordinates.h.
Referenced by dt_drawlayer_layer_points_to_widget_coords(), dt_drawlayer_raw_placement_for_frame(), and dt_drawlayer_widget_points_to_layer_coords().
| int dt_drawlayer_raw_placement_t::offset_y |
canvas pixel under the frame's origin, at full resolution
Definition at line 49 of file coordinates.h.
Referenced by dt_drawlayer_layer_points_to_widget_coords(), dt_drawlayer_raw_placement_for_frame(), and dt_drawlayer_widget_points_to_layer_coords().
| gboolean dt_drawlayer_raw_placement_t::valid |
Definition at line 50 of file coordinates.h.
Referenced by dt_drawlayer_raw_placement_for_frame().