src/polygoncache.cpp

changeset 232
8efa3a33172e
parent 211
b27b90fb993f
child 250
2837b549e616
--- a/src/polygoncache.cpp	Wed Jun 15 19:47:02 2022 +0300
+++ b/src/polygoncache.cpp	Mon Jun 20 02:04:51 2022 +0300
@@ -1,6 +1,7 @@
 #include "polygoncache.h"
 #include "documentmanager.h"
 #include "invert.h"
+#include "circularprimitive.h"
 
 Model* resolve(const QString& name, const ModelId callingModelId, DocumentManager* documents)
 {
@@ -76,6 +77,26 @@
 					}
 				}
 			},
+			[&result, id](const Colored<CircularPrimitive>& circ) {
+				rasterize(circ, [&](const ModelElement& element){
+					std::visit<void>(overloaded{
+						// TODO: :-(
+						[&](const Colored<LineSegment>& edge) {
+							result.push_back({{edge, edge.color}, id});
+						},
+						[&](const Colored<Triangle>& triangle) {
+							result.push_back({{triangle, triangle.color}, id});
+						},
+						[&](const Colored<Quadrilateral>& quad) {
+							result.push_back({{quad, quad.color}, id});
+						},
+						[&](const Colored<ConditionalEdge>& cedge) {
+							result.push_back({{cedge, cedge.color}, id});
+						},
+						[&](const auto&){},
+					}, element);
+				});
+			},
 			[](const ModelElement&) {}
 		}, element);
 	}

mercurial