| 556 | } |
| 557 | |
| 558 | Data 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 | |
| 582 | void Device::setKeepScreenOn(bool /*value*/) {} |
| 583 | |