Attribute-based vector format refactor (#1624)

* Initial vector format structure

* Click targets

* Code review pass

* Remove subpaths from vector data

* Morph node & vector node tests

* Insignificant change

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
0HyperCube
2024-03-09 10:27:30 -08:00
committed by GitHub
co-authored by Keavon Chambers
parent c8ea9e05a6
commit 218e9675fd
30 changed files with 991 additions and 436 deletions
@@ -4,7 +4,6 @@ use crate::messages::prelude::Message;
use bezier_rs::Subpath;
use graphene_core::renderer::Quad;
use graphene_core::uuid::ManipulatorGroupId;
use core::f64::consts::PI;
use glam::{DAffine2, DVec2};
@@ -114,7 +113,7 @@ impl OverlayContext {
self.render_context.stroke();
}
pub fn outline<'a>(&mut self, subpaths: impl Iterator<Item = &'a Subpath<ManipulatorGroupId>>, transform: DAffine2) {
pub fn outline<'a, Id: bezier_rs::Identifier>(&mut self, subpaths: impl Iterator<Item = &'a Subpath<Id>>, transform: DAffine2) {
self.render_context.begin_path();
for subpath in subpaths {
let mut curves = subpath.iter().peekable();