Go to the documentation of this file.
31 #define SDL_TESTFONTDATAMAX (8*256)
3126 const unsigned char *charpos;
3140 srect.
w = charWidth;
3141 srect.
h = charHeight;
3148 drect.
w = charWidth;
3149 drect.
h = charHeight;
3152 ci = (
unsigned char)
c;
3162 charWidth, charHeight, 32,
3163 0xFF000000, 0x00FF0000, 0x0000FF00, 0x000000FF);
3164 if (character ==
NULL) {
3170 pitch = character->
pitch;
3176 for (iy = 0; iy < charWidth; iy++) {
3179 for (ix = 0; ix < charWidth; ix++) {
3180 if (!(
mask >>= 1)) {
3185 *(
Uint32 *)curpos = 0xffffffff;
3228 const char *curchar =
s;
3230 while (*curchar && !
result) {
void SDLTest_CleanupTextDrawing(void)
Cleanup textures used by font drawing functions.
int SDLTest_DrawCharacter(SDL_Renderer *renderer, int x, int y, char c)
Draw a string in the currently set font.
int SDLTest_DrawString(SDL_Renderer *renderer, int x, int y, const char *s)
Draw a string in the currently set font.
A collection of pixels used in software blitting.
static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX]
GLboolean GLboolean GLboolean b
GLdouble GLdouble GLdouble r
#define SDL_TESTFONTDATAMAX
GLboolean GLboolean GLboolean GLboolean a
static SDL_Texture * SDLTest_CharTextureCache[256]
Global cache for 8x8 pixel font textures created at runtime.
#define SDL_CreateTextureFromSurface
GLint GLint GLint GLint GLint x
#define SDL_SetTextureColorMod
#define SDL_GetRenderDrawColor
GLint GLint GLint GLint GLint GLint y
#define SDL_CreateRGBSurface
#define SDL_arraysize(array)
#define FONT_CHARACTER_SIZE
#define SDL_DestroyTexture
static SDL_Renderer * renderer
A rectangle, with the origin at the upper left.
#define SDL_SetTextureAlphaMod
return Display return Display Bool Bool int int int return Display XEvent Bool(*) XPointer return Display return Display Drawable _Xconst char unsigned int unsigned int return Display Pixmap Pixmap XColor XColor unsigned int unsigned int return Display _Xconst char char int char return Display Visual unsigned int int int char unsigned int unsigned int in i)