SDL
2.0
|
Go to the source code of this file.
Macros | |
#define | BRUSH_SIZE 32 /* width and height of the brush */ |
#define | PIXELS_PER_ITERATION 5 /* number of pixels between brush blots when forming a line */ |
Functions | |
void | drawLine (SDL_Renderer *renderer, float startx, float starty, float dx, float dy) |
void | initializeTexture (SDL_Renderer *renderer) |
int | main (int argc, char *argv[]) |
Variables | |
static SDL_Texture * | brush = 0 |
Definition at line 11 of file touch.c.
Referenced by drawLine().
Definition at line 12 of file touch.c.
Referenced by drawLine().
void drawLine | ( | SDL_Renderer * | renderer, |
float | startx, | ||
float | starty, | ||
float | dx, | ||
float | dy | ||
) |
Definition at line 21 of file touch.c.
References BRUSH_SIZE, SDL_Rect::h, i, iterations, NULL, PIXELS_PER_ITERATION, SDL_RenderCopy, SDL_Rect::w, SDL_Rect::x, and SDL_Rect::y.
Referenced by main().
void initializeTexture | ( | SDL_Renderer * | renderer | ) |
Definition at line 56 of file touch.c.
References fatalError(), NULL, SDL_BLENDMODE_ADD, SDL_CreateTextureFromSurface, SDL_FreeSurface, SDL_LoadBMP, SDL_SetTextureBlendMode, and SDL_SetTextureColorMod.
Referenced by main().
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 76 of file touch.c.
References done, drawLine(), fatalError(), initializeTexture(), NULL, renderer, SDL_BUTTON_LMASK, SDL_CreateRenderer, SDL_CreateWindow, SDL_DestroyTexture, SDL_GetMouseState, SDL_GetRelativeMouseState, SDL_GetWindowSize, SDL_Init, SDL_INIT_VIDEO, SDL_MOUSEMOTION, SDL_Quit, SDL_QUIT, SDL_RenderClear, SDL_RenderPresent, SDL_RenderSetLogicalSize, SDL_SetRenderDrawColor, SDL_WaitEvent, SDL_WINDOW_ALLOW_HIGHDPI, SDL_WINDOW_BORDERLESS, state, and SDL_Event::type.
|
static |