Added comments to review function ImageTextEx()
This commit is contained in:
parent
4492a70a4b
commit
0958904eac
@ -1375,13 +1375,16 @@ Image ImageTextEx(SpriteFont font, const char *text, float fontSize, int spacing
|
|||||||
int length = strlen(text);
|
int length = strlen(text);
|
||||||
int posX = 0;
|
int posX = 0;
|
||||||
int index; // Index position in sprite font
|
int index; // Index position in sprite font
|
||||||
unsigned char character; // Current character
|
unsigned char character; // Current character
|
||||||
|
|
||||||
|
// TODO: ISSUE: Measured text size does not seem to be correct... issue on ImageDraw()
|
||||||
Vector2 imSize = MeasureTextEx(font, text, font.baseSize, spacing);
|
Vector2 imSize = MeasureTextEx(font, text, font.baseSize, spacing);
|
||||||
|
|
||||||
TraceLog(LOG_DEBUG, "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
|
// NOTE: glGetTexImage() not available in OpenGL ES
|
||||||
|
// TODO: This is horrible, retrieving font texture from GPU!!!
|
||||||
|
// Define ImageFont struct? or include Image spritefont in SpriteFont struct?
|
||||||
Image imFont = GetTextureData(font.texture);
|
Image imFont = GetTextureData(font.texture);
|
||||||
|
|
||||||
ImageColorTint(&imFont, tint); // Apply color tint to font
|
ImageColorTint(&imFont, tint); // Apply color tint to font
|
||||||
|
Loading…
Reference in New Issue
Block a user