Added some notes on draw_circle_filled

This commit is contained in:
Anna Rose 2011-06-23 14:34:53 -04:00
parent a9bd00f37d
commit 00d2efa31f
2 changed files with 8 additions and 3 deletions

View File

@ -86,8 +86,13 @@ void DrawUtils::draw_line(SDL_Surface* dest, Sint16 x1, Sint16 y1, Sint16 x2, Si
}
}
void DrawUtils::draw_circle_filled(SDL_Surface* dest, Sint16 int_x, Sint16 int_y, Uint16 int_r, Uint32 colour, Uint8 alpha)
// There's a funny story behind this function. I'd like to use the
// filledCircleRGBA function from SDL_gfx 2.0.22, but 2.0.17 doesn't have that
// fcn. So, we get this alpha-less option for now, instead.
// I tried using SDL_gfx's boxRGBA, but that is a lot slower, and doesn't
// succeed anyway - drawing 1800 overlapping rectangles blends any alpha value
// to opaque
void DrawUtils::draw_circle_filled(SDL_Surface* dest, Sint16 int_x, Sint16 int_y, Uint16 int_r, Uint32 colour)
{
float x = static_cast<float> (int_x);
float y = static_cast<float> (int_y);

View File

@ -75,7 +75,7 @@ void GameCore::render()
{
Vertex* v = graph.get_current_vertex();
DrawUtils::draw_circle_filled(display, v->x, v->y,
MAX_MOVE_DISTANCE, 0xcb1919, 128);
MAX_MOVE_DISTANCE, 0xcb1919);
}
for (list<Vertex*>::iterator cursor = vertices.begin();