| 165 | } |
| 166 | |
| 167 | void GuiContext::drawDrawable(Drawable drawable, Vec2F const& screenPos, float pixelRatio, Vec4B const& color) { |
| 168 | if (drawable.isLine()) |
| 169 | drawable.linePart().width *= pixelRatio; |
| 170 | |
| 171 | drawable.scale(pixelRatio); |
| 172 | drawable.translate(screenPos); |
| 173 | drawable.color *= Color::rgba(color); |
| 174 | m_drawablePainter->drawDrawable(drawable); |
| 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; |
no test coverage detected