microcad_core/geo2d/
mod.rs1mod bounds;
7mod circle;
8mod collection;
9mod geometry;
10mod line;
11mod primitives;
12mod size;
13
14use crate::*;
15
16pub use bounds::*;
17pub use circle::*;
18pub use collection::*;
19use geo::AffineTransform;
20pub use geometry::*;
21pub use line::*;
22pub use primitives::*;
23pub use size::*;
24
25pub trait FetchPoints2D {
27 fn fetch_points_2d(&self) -> Vec<Vec2>;
29}
30
31pub trait Transformed2D<T = Self> {
33 fn transformed_2d(&self, mat: &Mat3) -> T;
35}
36
37pub(crate) fn mat3_to_affine_transform(mat: &Mat3) -> AffineTransform {
39 geo::AffineTransform::new(mat.x.x, mat.y.x, mat.z.x, mat.x.y, mat.y.y, mat.z.y)
40}