diff options
| author | Ray <[email protected]> | 2018-01-28 16:52:18 +0100 |
|---|---|---|
| committer | Ray <[email protected]> | 2018-01-28 16:52:18 +0100 |
| commit | 1ce8c80de9f2270735ac371b655b2ca7de90d55a (patch) | |
| tree | 31bbb387fc3cce047f833e5e699415c0d62d702d /src/textures.c | |
| parent | f955b2255d447d4e6edd7b5f0a01032f443bc7d7 (diff) | |
| download | raylib-1ce8c80de9f2270735ac371b655b2ca7de90d55a.tar.gz raylib-1ce8c80de9f2270735ac371b655b2ca7de90d55a.zip | |
Corrected several issues...
Diffstat (limited to 'src/textures.c')
| -rw-r--r-- | src/textures.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/textures.c b/src/textures.c index 34d6182c..2772e246 100644 --- a/src/textures.c +++ b/src/textures.c @@ -1377,13 +1377,12 @@ Image ImageTextEx(SpriteFont font, const char *text, float fontSize, int spacing Vector2 imSize = MeasureTextEx(font, text, font.baseSize, spacing); - TraceLog(LOG_WARNING, "Text Image size: %f, %f", imSize.x, imSize.y); + TraceLog(LOG_DEBUG, "Text Image size: %f, %f", imSize.x, imSize.y); // NOTE: glGetTexImage() not available in OpenGL ES Image imFont = GetTextureData(font.texture); - - ImageFormat(&imFont, UNCOMPRESSED_R8G8B8A8); // Convert to 32 bit for color tint - ImageColorTint(&imFont, tint); // Apply color tint to font + + ImageColorTint(&imFont, tint); // Apply color tint to font // Create image to store text Image imText = GenImageColor((int)imSize.x, (int)imSize.y, BLANK); @@ -1405,7 +1404,7 @@ Image ImageTextEx(SpriteFont font, const char *text, float fontSize, int spacing if (fontSize > imSize.y) { float scaleFactor = fontSize/imSize.y; - TraceLog(LOG_INFO, "Scalefactor: %f", scaleFactor); + TraceLog(LOG_INFO, "Image text scaled by factor: %f", scaleFactor); // Using nearest-neighbor scaling algorithm for default font if (font.texture.id == GetDefaultFont().texture.id) ImageResizeNN(&imText, (int)(imSize.x*scaleFactor), (int)(imSize.y*scaleFactor)); |
