SDL  2.0
SDL_test_font.h File Reference
#include "begin_code.h"
#include "close_code.h"
+ Include dependency graph for SDL_test_font.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define FONT_CHARACTER_SIZE   8
 

Functions

int SDLTest_DrawCharacter (SDL_Renderer *renderer, int x, int y, char c)
 Draw a string in the currently set font. More...
 
int SDLTest_DrawString (SDL_Renderer *renderer, int x, int y, const char *s)
 Draw a string in the currently set font. More...
 
void SDLTest_CleanupTextDrawing (void)
 Cleanup textures used by font drawing functions. More...
 

Detailed Description

Include file for SDL test framework.

This code is a part of the SDL2_test library, not the main SDL library.

Definition in file SDL_test_font.h.

Macro Definition Documentation

◆ FONT_CHARACTER_SIZE

#define FONT_CHARACTER_SIZE   8

Definition at line 41 of file SDL_test_font.h.

Function Documentation

◆ SDLTest_CleanupTextDrawing()

void SDLTest_CleanupTextDrawing ( void  )

Cleanup textures used by font drawing functions.

◆ SDLTest_DrawCharacter()

int SDLTest_DrawCharacter ( SDL_Renderer renderer,
int  x,
int  y,
char  c 
)

Draw a string in the currently set font.

Parameters
rendererThe renderer to draw on.
xThe X coordinate of the upper left corner of the character.
yThe Y coordinate of the upper left corner of the character.
cThe character to draw.
Returns
0 on success, -1 on failure.

◆ SDLTest_DrawString()

int SDLTest_DrawString ( SDL_Renderer renderer,
int  x,
int  y,
const char *  s 
)

Draw a string in the currently set font.

Parameters
rendererThe renderer to draw on.
xThe X coordinate of the upper left corner of the string.
yThe Y coordinate of the upper left corner of the string.
sThe string to draw.
Returns
0 on success, -1 on failure.