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

Method drawText

source/windowing/StarCanvasWidget.cpp:70–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68}
69
70void CanvasWidget::drawText(String s, TextPositioning position, unsigned fontSize, Vec4B const& color, FontMode mode, float lineSpacing, String font, String processingDirectives) {
71 TextStyle style;
72 style.fontSize = fontSize;
73 style.color = color;
74 style.shadow = fontModeToColor(mode).toRgba();
75 style.lineSpacing = lineSpacing;
76 style.font = font;
77 style.directives = processingDirectives;
78 m_renderOps.append(make_tuple(std::move(s), std::move(position), std::move(style)));
79}
80
81void CanvasWidget::drawText(String s, TextPositioning position, TextStyle style) {
82 m_renderOps.append(make_tuple(std::move(s), std::move(position), std::move(style)));

Callers 2

makeMethod · 0.80
renderImplMethod · 0.80

Calls 2

toRgbaMethod · 0.80
appendMethod · 0.45

Tested by

no test coverage detected