VGA

clearArea()

Description

Clears an area in the screen.

Syntax

VGA.clearArea( x, y, width, height )

Parameters

x - column where to start clearing the area
y - row where to start clearing the area
width - width of the area
height - height of the area

Example

const int board_x0 = 40;
const int board_y0 = 5;
const int blocks_x = 10;
const int blocks_y = 20;
const int blocksize = 5;

unsigned offsety = board_y0 + ( y * blocksize );
int i;

for ( i=0; i<4; i++ )
{

VGA.setColor( YELLOW );
VGA.clearArea( board_x0, offsety, blocksize * blocks_x, blocksize );
waitTick();
VGA.setColor( RED );
VGA.clearArea( board_x0, offsety, blocksize * blocks_x, blocksize );
waitTick();

}
VGA.setColor( GREEN );

See also

  

Share |