zenilib: zenilib/jni/external/sdl/src/test/SDL_test_font.c File Reference

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Macros | Functions | Variables
SDL_test_font.c File Reference
`#include "SDL_config.h"`
`#include "SDL_test.h"`

Go to the source code of this file.

## Macros

#define | SDL_TESTFONTDATAMAX (8*256)

## Functions

int | SDLTest_DrawCharacter (SDL_Renderer *renderer, int x, int y, char c)
int | SDLTest_DrawString (SDL_Renderer *renderer, int x, int y, const char *s)
| Draw a string in the currently set font. More...

## Variables

static SDL_Texture * | SDLTest_CharTextureCache [256]
static unsigned char | SDLTest_FontData [SDL_TESTFONTDATAMAX]

## Macro Definition Documentation

#define SDL_TESTFONTDATAMAX (8*256)

Definition at line 31 of file SDL_test_font.c.

## Function Documentation

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

Definition at line 3117 of file SDL_test_font.c.

References for(), SDL_Rect::h, ix, iy, NULL, SDL_Surface::pitch, SDL_Surface::pixels, SDL_CreateRGBSurface(), SDL_CreateTextureFromSurface(), SDL_FreeSurface(), SDL_GetRenderDrawColor(), SDL_RenderCopy(), SDL_SetTextureAlphaMod(), SDL_SetTextureColorMod(), SDL_SWSURFACE, SDLTest_FontData, SDL_Rect::w, SDL_Rect::x, and SDL_Rect::y.

Referenced by SDLTest_DrawString().

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

Draw a string in the currently set font.

Parameters

  renderer | The renderer to draw on.
  x | The X coordinate of the upper left corner of the string.
  y | The Y coordinate of the upper left corner of the string.
  s | The string to draw.

Returns
  Returns 0 on success, -1 on failure.

Definition at line 3222 of file SDL_test_font.c.

References SDLTest_DrawCharacter().

## Variable Documentation

SDL_Texture* SDLTest_CharTextureCache[256]

static

Definition at line 3115 of file SDL_test_font.c.

unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX]

static

Definition at line 33 of file SDL_test_font.c.

Referenced by SDLTest_DrawCharacter().