implementation Texture2D (Text)
| 468 | |
| 469 | // implementation Texture2D (Text) |
| 470 | bool Texture2D::initWithString(std::string_view text, |
| 471 | std::string_view fontName, |
| 472 | float fontSize, |
| 473 | const Vec2& dimensions /* = Vec2(0, 0)*/, |
| 474 | TextHAlignment hAlignment /* = TextHAlignment::CENTER */, |
| 475 | TextVAlignment vAlignment /* = TextVAlignment::TOP */, |
| 476 | bool enableWrap /* = false */, |
| 477 | int overflow /* = 0 */) |
| 478 | { |
| 479 | FontDefinition tempDef; |
| 480 | |
| 481 | tempDef._shadow._shadowEnabled = false; |
| 482 | tempDef._stroke._strokeEnabled = false; |
| 483 | |
| 484 | tempDef._fontName = fontName; |
| 485 | tempDef._fontSize = fontSize; |
| 486 | tempDef._dimensions = dimensions; |
| 487 | tempDef._alignment = hAlignment; |
| 488 | tempDef._vertAlignment = vAlignment; |
| 489 | tempDef._fontFillColor = Color3B::WHITE; |
| 490 | tempDef._enableWrap = enableWrap; |
| 491 | tempDef._overflow = overflow; |
| 492 | |
| 493 | return initWithString(text, tempDef); |
| 494 | } |
| 495 | |
| 496 | bool Texture2D::initWithString(std::string_view text, const FontDefinition& textDefinition) |
| 497 | { |
no test coverage detected