markRect method
Implementation
void markRect( double sx, double sy, double ex, double ey ){
int i;
int tmp;
int posX = _gWorld.imgPosX( sx );
int posY = _gWorld.imgPosY( sy );
int endX = _gWorld.imgPosX( ex );
int endY = _gWorld.imgPosY( ey );
if( posX > endX ){
tmp = posX; posX = endX; endX = tmp;
}
if( posY > endY ){
tmp = posY; posY = endY; endY = tmp;
}
for( i = posX; i <= endX; i++ ){
_gWorld.putXOR( i, posY );
_gWorld.putXOR( i, endY );
}
for( i = posY + 1; i < endY; i++ ){
_gWorld.putXOR( posX, i );
_gWorld.putXOR( endX, i );
}
}