mirror of
https://github.com/storytold/effectcraft.git
synced 2026-11-02 22:42:24 -06:00
Auto-Trace: traced outlines map back into layer space (#2764)
Co-authored-by: Chewybone-sudo <347238078+Chewybone-sudo@users.noreply.github.com>
This commit is contained in:
co-authored by
Chewybone-sudo
parent
49774ca5f9
commit
3ab2167e47
@@ -64,8 +64,9 @@ fn trace_frame(img: &Image, offset: [f64; 2], ch: Channel, invert: bool, blur: f
|
||||
let mut out = trace(&field, img.width as usize, img.height as usize, o);
|
||||
for t in &mut out {
|
||||
for v in &mut t.path.vertices {
|
||||
v[0] += offset[0];
|
||||
v[1] += offset[1];
|
||||
// Source buffers are layer pixels + offset: subtract it to get back to layer space.
|
||||
v[0] -= offset[0];
|
||||
v[1] -= offset[1];
|
||||
}
|
||||
}
|
||||
out
|
||||
|
||||
Reference in New Issue
Block a user