MCPcopy Create free account
hub / github.com/axmolengine/axmol / getTextureDataForText

Method getTextureDataForText

core/platform/linux/Device-linux.cpp:558–580  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

556}
557
558Data Device::getTextureDataForText(std::string_view text,
559 const FontDefinition& textDefinition,
560 TextAlign align,
561 int& width,
562 int& height,
563 bool& hasPremultipliedAlpha)
564{
565 Data ret;
566 do
567 {
568 BitmapDC& dc = sharedBitmapDC();
569
570 AX_BREAK_IF(!dc.getBitmap(text.data(), textDefinition, align));
571 AX_BREAK_IF(!dc._data);
572 width = dc.iMaxLineWidth;
573 height = dc.iMaxLineHeight;
574 dc.reset();
575 ret.fastSet(dc._data, width * height * 4);
576 hasPremultipliedAlpha = true;
577 } while (0);
578
579 return ret;
580}
581
582void Device::setKeepScreenOn(bool /*value*/) {}
583

Callers

nothing calls this directly

Calls 4

getBitmapMethod · 0.80
fastSetMethod · 0.80
dataMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected