Extract gsvg_renderer from gcore, remove gcore/vello feature (#2760)

Extract `gsvg_renderer` from `gcore`, remove `gcore/vello` feature
This commit is contained in:
Firestar99
2025-06-27 13:47:46 +00:00
committed by GitHub
parent ffc6c5532b
commit 9c4ab34a58
26 changed files with 546 additions and 368 deletions
+24
View File
@@ -0,0 +1,24 @@
use crate::Color;
use glam::{DAffine2, DVec2};
pub trait BoundingBox {
fn bounding_box(&self, transform: DAffine2, include_stroke: bool) -> Option<[DVec2; 2]>;
}
macro_rules! none_impl {
($t:path) => {
impl BoundingBox for $t {
fn bounding_box(&self, _transform: DAffine2, _include_stroke: bool) -> Option<[DVec2; 2]> {
None
}
}
};
}
none_impl!(String);
none_impl!(bool);
none_impl!(f32);
none_impl!(f64);
none_impl!(DVec2);
none_impl!(Option<Color>);
none_impl!(Vec<Color>);