Skip to content

Commit

Permalink
Exposed the font character size and SDLTest_DrawCharacter() to make i…
Browse files Browse the repository at this point in the history
…t easier to do custom debug text layout
  • Loading branch information
slouken committed Feb 10, 2014
1 parent a396841 commit 9f2509d
Show file tree
Hide file tree
Showing 2 changed files with 147 additions and 133 deletions.
16 changes: 15 additions & 1 deletion include/SDL_test_font.h
Expand Up @@ -38,6 +38,20 @@ extern "C" {

/* Function prototypes */

#define FONT_CHARACTER_SIZE 8

/**
* \brief Draw a string in the currently set font.
*
* \param renderer The renderer to draw on.
* \param x The X coordinate of the upper left corner of the character.
* \param y The Y coordinate of the upper left corner of the character.
* \param c The character to draw.
*
* \returns Returns 0 on success, -1 on failure.
*/
int SDLTest_DrawCharacter( SDL_Renderer *renderer, int x, int y, char c );

/**
* \brief Draw a string in the currently set font.
*
Expand All @@ -48,7 +62,7 @@ extern "C" {
*
* \returns Returns 0 on success, -1 on failure.
*/
int SDLTest_DrawString(SDL_Renderer * renderer, int x, int y, const char *s);
int SDLTest_DrawString( SDL_Renderer * renderer, int x, int y, const char *s );


/* Ends C function definitions when using C++ */
Expand Down

0 comments on commit 9f2509d

Please sign in to comment.