MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / DrawTTFBitmap

Method DrawTTFBitmap

src/openrct2/drawing/X8DrawingEngine.cpp:654–678  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

652#endif // DISABLE_TTF
653
654void 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
680void X8DrawingContext::BeginDraw()
681{

Callers 1

drawStringRawTTFFunction · 0.45

Calls 1

hasMethod · 0.65

Tested by

no test coverage detected