Download node-graph/gcore/src/bounds.rs from openfree/graphite2: direct link, hf CLI and curl.
- Browser
- Download file 496 Bytes
-
https://huggingface.co/spaces/openfree/graphite2/resolve/main/node-graph/gcore/src/bounds.rs
- Command line
-
hf download hf://spaces/openfree/graphite2/node-graph/gcore/src/bounds.rs
-
curl -L -o bounds.rs https://huggingface.co/spaces/openfree/graphite2/resolve/main/node-graph/gcore/src/bounds.rs
496 Bytes
| 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>); | |