MCPcopy Create free account
hub / github.com/PlotJuggler/PlotJuggler / appendLoopFill

Function appendLoopFill

pj_scene2D/core/src/overlay_geometry.cpp:129–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127}
128
129void appendLoopFill(const PointsAnnotation& pa, std::vector<float>& out) {
130 if (pa.topology != AnnotationTopology::kLineLoop || pa.fill_color.a == 0 || pa.points.size() < 3) {
131 return;
132 }
133 const Point2& p0 = pa.points[0];
134 for (size_t i = 1; i + 1 < pa.points.size(); ++i) {
135 pushVertex(out, p0.x, p0.y, pa.fill_color);
136 pushVertex(out, pa.points[i].x, pa.points[i].y, pa.fill_color);
137 pushVertex(out, pa.points[i + 1].x, pa.points[i + 1].y, pa.fill_color);
138 }
139}
140
141void appendCircleStroke(const CircleAnnotation& circle, double image_px_per_screen_px, std::vector<float>& out) {
142 if (circle.color.a == 0 || circle.radius <= 0.0) {

Callers 2

TESTFunction · 0.85
renderMethod · 0.85

Calls 2

pushVertexFunction · 0.85
sizeMethod · 0.45

Tested by 1

TESTFunction · 0.68