Added RenderPiont() API

Merged the drawing tests into a single test program

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403363
This commit is contained in:
Sam Lantinga 2008-12-21 17:39:41 +00:00
parent 4f84ec9b5e
commit f055f6a189
16 changed files with 671 additions and 264 deletions

View file

@ -73,6 +73,7 @@ static void DirectFB_DirtyTexture(SDL_Renderer * renderer,
const SDL_Rect * rects);
static int DirectFB_SetDrawColor(SDL_Renderer * renderer);
static int DirectFB_SetDrawBlendMode(SDL_Renderer * renderer);
static int DirectFB_RenderPoint(SDL_Renderer * renderer, int x, int y);
static int DirectFB_RenderLine(SDL_Renderer * renderer, int x1, int y1,
int x2, int y2);
static int DirectFB_RenderFill(SDL_Renderer * renderer,
@ -295,6 +296,7 @@ DirectFB_CreateRenderer(SDL_Window * window, Uint32 flags)
renderer->DirtyTexture = DirectFB_DirtyTexture;
renderer->SetDrawColor = DirectFB_SetDrawColor;
renderer->SetDrawBlendMode = DirectFB_SetDrawBlendMode;
renderer->RenderPoint = DirectFB_RenderPoint;
renderer->RenderLine = DirectFB_RenderLine;
renderer->RenderFill = DirectFB_RenderFill;
renderer->RenderCopy = DirectFB_RenderCopy;
@ -843,6 +845,19 @@ PrepareDraw(SDL_Renderer * renderer)
return -1;
}
static int
DirectFB_RenderPoint(SDL_Renderer * renderer, int x, int y)
{
DirectFB_RenderData *data = (DirectFB_RenderData *) renderer->driverdata;
DFBResult ret;
PrepareDraw(renderer);
SDL_DFB_CHECKERR(data->surface->DrawPoint(data->surface, x, y));
return 0;
error:
return -1;
}
static int
DirectFB_RenderLine(SDL_Renderer * renderer, int x1, int y1, int x2, int y2)
{