summaryrefslogtreecommitdiffstats
path: root/svgbob/src/buffer/fragment_buffer/fragment.rs
diff options
context:
space:
mode:
authorJovansonlee Cesar <ivanceras@gmail.com>2020-11-25 17:00:45 +0800
committerJovansonlee Cesar <ivanceras@gmail.com>2020-11-25 17:00:45 +0800
commite42ecb4fed9495daad3bc819268103305b26ea0b (patch)
tree7e33f328e5f002069b32f74b69452e7d5c487356 /svgbob/src/buffer/fragment_buffer/fragment.rs
parentdcd65f2361f88b7cbc9e81b91382f21c60114706 (diff)
get rid of can_merge_polygon, instead call on merge_polygon().is_some() instead to avoid code duplication
Diffstat (limited to 'svgbob/src/buffer/fragment_buffer/fragment.rs')
-rw-r--r--svgbob/src/buffer/fragment_buffer/fragment.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/svgbob/src/buffer/fragment_buffer/fragment.rs b/svgbob/src/buffer/fragment_buffer/fragment.rs
index 7fd5cb9..ae3378a 100644
--- a/svgbob/src/buffer/fragment_buffer/fragment.rs
+++ b/svgbob/src/buffer/fragment_buffer/fragment.rs
@@ -203,12 +203,12 @@ impl Fragment {
Fragment::Line(line) => match other {
Fragment::Line(other) => line.is_touching(other),
Fragment::Arc(other_arc) => line.is_touching_arc(other_arc),
- Fragment::Polygon(polygon) => line.can_merge_polygon(polygon),
+ Fragment::Polygon(polygon) => line.merge_line_polygon(polygon).is_some(),
Fragment::Circle(circle) => line.is_touching_circle(circle),
_ => false,
},
Fragment::Polygon(polygon) => match other {
- Fragment::Line(other) => other.can_merge_polygon(polygon),
+ Fragment::Line(other) => other.merge_line_polygon(polygon).is_some(),
_ => false,
},
Fragment::Arc(arc) => match other {