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

Method getTextureDataForText

core/platform/android/Device-android.cpp:157–182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155}
156
157Data Device::getTextureDataForText(std::string_view text,
158 const FontDefinition& textDefinition,
159 TextAlign align,
160 int& width,
161 int& height,
162 bool& hasPremultipliedAlpha)
163{
164 Data ret;
165 do
166 {
167 BitmapDC& dc = sharedBitmapDC();
168
169 if (!dc.getBitmapFromJavaShadowStroke(text, (int)textDefinition._dimensions.width,
170 (int)textDefinition._dimensions.height, align, textDefinition))
171 {
172 break;
173 };
174
175 width = dc._width;
176 height = dc._height;
177 ret.fastSet(dc._data, width * height * 4);
178 hasPremultipliedAlpha = true;
179 } while (0);
180
181 return ret;
182}
183
184void Device::setKeepScreenOn(bool value)
185{

Callers

nothing calls this directly

Calls 2

fastSetMethod · 0.80

Tested by

no test coverage detected