| 268 | } |
| 269 | |
| 270 | void CanvasWidget::renderText(Vec2F const& renderingOffset, String const& s, TextPositioning const& position, TextStyle const& style) { |
| 271 | auto& context = GuiContext::singleton(); |
| 272 | context.setTextStyle(style, m_ignoreInterfaceScale ? 1 : context.interfaceScale()); |
| 273 | |
| 274 | TextPositioning translatedPosition = position; |
| 275 | translatedPosition.pos += renderingOffset; |
| 276 | if (m_ignoreInterfaceScale) |
| 277 | context.renderText(s, translatedPosition); |
| 278 | else |
| 279 | context.renderInterfaceText(s, translatedPosition); |
| 280 | |
| 281 | context.clearTextStyle(); |
| 282 | } |
| 283 | |
| 284 | } |
nothing calls this directly
no test coverage detected