| 652 | #endif // DISABLE_TTF |
| 653 | |
| 654 | void X8DrawingContext::DrawTTFBitmap( |
| 655 | RenderTarget& rt, const TextDrawInfo& info, TTFSurface* surface, int32_t x, int32_t y, uint8_t hintingThreshold) |
| 656 | { |
| 657 | #ifndef DISABLE_TTF |
| 658 | const auto fgColor = info.palette.fill; |
| 659 | const auto bgColor = info.palette.shadowOutline; |
| 660 | |
| 661 | if (info.colourFlags.has(ColourFlag::withOutline)) |
| 662 | { |
| 663 | DrawTTFBitmapInternal<false>(rt, bgColor, surface, x + 1, y, 0); |
| 664 | DrawTTFBitmapInternal<false>(rt, bgColor, surface, x - 1, y, 0); |
| 665 | DrawTTFBitmapInternal<false>(rt, bgColor, surface, x, y + 1, 0); |
| 666 | DrawTTFBitmapInternal<false>(rt, bgColor, surface, x, y - 1, 0); |
| 667 | } |
| 668 | if (info.colourFlags.has(ColourFlag::inset)) |
| 669 | { |
| 670 | DrawTTFBitmapInternal<false>(rt, bgColor, surface, x + 1, y + 1, 0); |
| 671 | } |
| 672 | |
| 673 | if (hintingThreshold > 0) |
| 674 | DrawTTFBitmapInternal<true>(rt, fgColor, surface, x, y, hintingThreshold); |
| 675 | else |
| 676 | DrawTTFBitmapInternal<false>(rt, fgColor, surface, x, y, 0); |
| 677 | #endif // DISABLE_TTF |
| 678 | } |
| 679 | |
| 680 | void X8DrawingContext::BeginDraw() |
| 681 | { |