![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
How the overlay maps image coordinates onto its cairo target. More...
#include <masks_gui.h>
Collaboration diagram for dt_masks_overlay_transform_t:Data Fields | |
| double | scale |
| double | offset_x |
| double | offset_y |
How the overlay maps image coordinates onto its cairo target.
The darkroom passes NULL and the mapping comes from the viewport – zoom, pan, and the GUI's device pixel ratio. None of that exists outside the GUI: dt_gui_get_global() is darktable.gui, which is NULL in ansel-cli and in the test binaries, so the viewport path would dereference it. A headless caller supplies its own mapping instead, which is also what a regression test wants – a fixed, reproducible transform rather than whatever the window happened to be showing.
This exists so the OVERLAY IS DRAWN BY THE SAME CODE in both cases. The alternative – a second drawing path for diagnostics – would be a fork that stops agreeing with the GUI exactly when it is needed to explain a GUI problem.
Definition at line 597 of file masks_gui.h.
| double dt_masks_overlay_transform_t::offset_x |
Definition at line 600 of file masks_gui.h.
| double dt_masks_overlay_transform_t::offset_y |
target-space translation, applied before the scale
Definition at line 600 of file masks_gui.h.
| double dt_masks_overlay_transform_t::scale |
image pixels -> target pixels
Definition at line 599 of file masks_gui.h.
Referenced by _check_hidpi_placement(), _overlay_leftovers(), _time_overlay_form(), and dt_masks_debug_write_png().