| 175 | } |
| 176 | |
| 177 | void GuiContext::drawLine(Vec2F const& begin, Vec2F const end, Vec4B const& color, float lineWidth) { |
| 178 | Vec2F left = vnorm(Vec2F(end) - Vec2F(begin)).rot90() * lineWidth / 2.0f; |
| 179 | renderer()->immediatePrimitives().emplace_back(std::in_place_type_t<RenderQuad>(), |
| 180 | begin + left, |
| 181 | begin - left, |
| 182 | end - left, |
| 183 | end + left, |
| 184 | color, 0.0f); |
| 185 | } |
| 186 | |
| 187 | void GuiContext::drawPolyLines(PolyF const& poly, Vec4B const& color, float lineWidth) { |
| 188 | for (size_t i = 0; i < poly.sides(); ++i) |
no test coverage detected