Codechange: Give sprite encoders a hint which colour components of a sprite are filled with useful information.

This commit is contained in:
Michael Lutz
2021-01-16 16:43:30 +01:00
parent e7e5316340
commit 70aa3b4011
6 changed files with 21 additions and 10 deletions

View File

@@ -286,6 +286,7 @@ const Sprite *CoreTextFontCache::InternalGetGlyph(GlyphID key, bool use_aa)
SpriteLoader::Sprite sprite;
sprite.AllocateData(ZOOM_LVL_NORMAL, width * height);
sprite.type = ST_FONT;
sprite.colours = (use_aa ? SCC_PAL | SCC_ALPHA : SCC_PAL);
sprite.width = width;
sprite.height = height;
sprite.x_offs = (int16)std::round(CGRectGetMinX(bounds));