예제 #1
0
void
ShrinkFade::draw(DrawingContext& context)
{
  float progress = accum_time / fade_time;
  float diameter = 2 * initial_size * (1.0f - progress);
  context.draw_inverse_ellipse(dest, Vector(1.1f * diameter, diameter),
                               Color(0, 0, 0), LAYER_GUI+1);
}
예제 #2
0
void
ShrinkFade::draw(DrawingContext& context)
{
  float progress = accum_time / fade_time;
  context.draw_inverse_ellipse(dest,
                               Vector(2*SCREEN_WIDTH  * (1.0f - progress),
                                      2*SCREEN_HEIGHT * (1.0f - progress)),
                               Color(0, 0, 0), LAYER_GUI+1);
}