mirror of
https://github.com/storytold/effectcraft.git
synced 2026-11-04 01:28:49 +00: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:
1 parent
49774ca5f9
commit
3ab2167e47
1 file changed
+3
-2
@@ -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