![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
One cut in a shape's border outline: while walking the border buffer forward, on reaching index jump_from, resume at index resume_at.
More...
#include <masks_types.h>
Collaboration diagram for dt_masks_skip_range_t:Data Fields | |
| int | jump_from |
| int | resume_at |
One cut in a shape's border outline: while walking the border buffer forward, on reaching index jump_from, resume at index resume_at.
A brush's or a polygon's border is its centreline offset by the local radius, and that offset curve folds over itself wherever the centreline bends tighter than the radius, and runs through the shape wherever the centreline comes back on itself. The samples that are not on the shape's boundary are found by dt_masks_outline_boundary_skips() – a border sample is on the boundary iff it is not strictly inside any other sample's disc – and are skipped by the GUI's drawer and by every walk that counts crossings (the hit-test). The rasterisers paint every sample: a spoke inside another disc paints nothing new.
These used to travel IN-BAND, encoded into the border buffer itself: NaN in the x slot, the jump target smuggled as an integer in the float y slot. Both bugs this mechanism ever had lived in that encoding, not in the geometry – a cycle when overlapping ranges pointed into each other (fixed by sorting and merging), then issue #1313, where a fold straddling the buffer seam was encoded as its own complement and swallowed 99.8% of the contour. An out-of-band range cannot express either mistake: resume_at > jump_from IS the forward-only invariant, checkable at a glance and validated by the consumers.
Invariants a producer must guarantee (dt_masks_outline_boundary_skips() does):
Definition at line 225 of file masks_types.h.
| int dt_masks_skip_range_t::jump_from |
Definition at line 227 of file masks_types.h.
Referenced by _outline_skips_from_dropped(), _overlay_dump_skips(), _overlay_skip_of(), _overlay_skip_of(), and _overlay_skipped().
| int dt_masks_skip_range_t::resume_at |
Definition at line 228 of file masks_types.h.
Referenced by _outline_skips_from_dropped(), _overlay_dump_skips(), _overlay_skipped(), and dt_masks_point_in_form_exact().