summaryrefslogtreecommitdiffstats
path: root/core/src/solving.rs
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/solving.rs')
-rw-r--r--core/src/solving.rs30
1 files changed, 17 insertions, 13 deletions
diff --git a/core/src/solving.rs b/core/src/solving.rs
index 261b4d4..bf5fe95 100644
--- a/core/src/solving.rs
+++ b/core/src/solving.rs
@@ -1,4 +1,7 @@
1use crate::core_shapes::{CoreDrawable, CoreShape, DefinedCoreDrawable, DefinedCoreShape}; 1use crate::core_shapes::{
2 CoreDrawable, CoreShape, DefinedCoreDrawable, DefinedCoreShape, DefinedStraightPath,
3 StraightPath,
4};
2 5
3use super::styles::*; 6use super::styles::*;
4use super::text::*; 7use super::text::*;
@@ -155,6 +158,7 @@ impl Constrainable for CoreShape {
155 match self { 158 match self {
156 CoreShape::Rectangle(r) => Some(DefinedCoreShape::Rectangle(*r)), 159 CoreShape::Rectangle(r) => Some(DefinedCoreShape::Rectangle(*r)),
157 CoreShape::Text(t) => t.fixate(model).map(DefinedCoreShape::Text), 160 CoreShape::Text(t) => t.fixate(model).map(DefinedCoreShape::Text),
161 CoreShape::StraightPath(p) => p.fixate(model).map(DefinedCoreShape::StraightPath),
158 } 162 }
159 } 163 }
160} 164}
@@ -288,15 +292,15 @@ impl Constrainable for Text {
288 } 292 }
289} 293}
290 294
291// impl Constrainable for StraightPath { 295impl Constrainable for StraightPath {
292// type Fixated = DefinedStraightPath; 296 type Fixated = DefinedStraightPath;
293// 297
294// fn fixate(&self, model: &dyn SolverModel) -> Option<Self::Fixated> { 298 fn fixate(&self, model: &dyn SolverModel) -> Option<Self::Fixated> {
295// let points: Option<_> = self 299 let points: Option<_> = self
296// .points 300 .points
297// .iter() 301 .iter()
298// .map(|point| point.fixate(model)) 302 .map(|point| point.fixate(model))
299// .collect(); 303 .collect();
300// Some(DefinedStraightPath { points: points? }) 304 Some(DefinedStraightPath { points: points? })
301// } 305 }
302// } 306}