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

Method determineInterfaceTextSize

source/windowing/StarGuiContext.cpp:342–350  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

340}
341
342RectF GuiContext::determineInterfaceTextSize(String const& s, TextPositioning const& positioning) {
343 auto res = determineTextSize(s, {
344 positioning.pos * interfaceScale(),
345 positioning.hAnchor,
346 positioning.vAnchor,
347 positioning.wrapWidth.apply(bind(std::multiplies<int>(), _1, interfaceScale()))
348 });
349 return RectF(res).scaled(1.0f / interfaceScale());
350}
351
352void GuiContext::setFontSize(unsigned size) {
353 setFontSize(size, interfaceScale());

Callers 2

updateTextRegionMethod · 0.80
renderImplMethod · 0.80

Calls 2

scaledMethod · 0.80
applyMethod · 0.45

Tested by

no test coverage detected