MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / renderPoly

Method renderPoly

source/windowing/StarCanvasWidget.cpp:248–255  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

246}
247
248void CanvasWidget::renderPoly(Vec2F const& renderingOffset, PolyF poly, Vec4B const& color, float lineWidth) {
249 auto& context = GuiContext::singleton();
250 poly.translate(renderingOffset);
251 if (m_ignoreInterfaceScale)
252 context.drawPolyLines(poly, color, lineWidth);
253 else
254 context.drawInterfacePolyLines(poly, color, lineWidth);
255}
256
257void CanvasWidget::renderTriangles(Vec2F const& renderingOffset, List<tuple<Vec2F, Vec2F, Vec2F>> const& triangles, Vec4B const& color) {
258 auto& context = GuiContext::singleton();

Callers

nothing calls this directly

Calls 4

singletonClass · 0.85
drawPolyLinesMethod · 0.80
translateMethod · 0.45

Tested by

no test coverage detected