MCPcopy Create free account
hub / github.com/TurningWheel/Barony / drawBox

Function drawBox

src/draw.cpp:1397–1404  ·  view source on GitHub ↗

------------------------------------------------------------------------------- drawBox draws the border of a rectangle -------------------------------------------------------------------------------*/

Source from the content-addressed store, hash-verified

1395
1396-------------------------------------------------------------------------------*/
1397int drawBox(SDL_Rect* src, Uint32 color, Uint8 alpha)
1398{
1399 drawLine(src->x, src->y, src->x + src->w, src->y, color, alpha); //Top.
1400 drawLine(src->x, src->y, src->x, src->y + src->h, color, alpha); //Left.
1401 drawLine(src->x + src->w, src->y, src->x + src->w, src->y + src->h, color, alpha); //Right.
1402 drawLine(src->x, src->y + src->h, src->x + src->w, src->y + src->h, color, alpha); //Bottom.
1403 return 0;
1404}
1405
1406/*-------------------------------------------------------------------------------
1407

Callers 1

handleButtonsFunction · 0.85

Calls 1

drawLineFunction · 0.85

Tested by

no test coverage detected