SDL standard library

Dependents:   H261_encoder

Embed: (wiki syntax)

« Back to documentation index

SDL_test_font.h File Reference

SDL_test_font.h File Reference

Include file for SDL test framework. More...

Go to the source code of this file.

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.

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.


Function Documentation

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:
Returns 0 on success, -1 on failure.
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:
Returns 0 on success, -1 on failure.