Explorar o código

Corrected issue with font tint

Ray %!s(int64=7) %!d(string=hai) anos
pai
achega
ac31f51c5e
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      src/textures.c

+ 3 - 1
src/textures.c

@@ -1555,7 +1555,9 @@ Image ImageTextEx(Font font, const char *text, float fontSize, float spacing, Co
     // Define ImageFont struct? or include Image spritefont in Font struct?
     // Define ImageFont struct? or include Image spritefont in Font struct?
     Image imFont = GetTextureData(font.texture);
     Image imFont = GetTextureData(font.texture);
     
     
-    ImageColorTint(&imFont, tint);                    // Apply color tint to font
+    ImageFormat(&imFont, UNCOMPRESSED_R8G8B8A8);    // Make sure image format could be properly colored!
+    
+    ImageColorTint(&imFont, tint);                  // Apply color tint to font
 
 
     // Create image to store text
     // Create image to store text
     Image imText = GenImageColor((int)imSize.x, (int)imSize.y, BLANK);
     Image imText = GenImageColor((int)imSize.x, (int)imSize.y, BLANK);