Hi!

I have made a simple example.
Mouse events are processing in this example.
On click and on drag the rectangle is drawing. And if in the same case the key Ctrl is pressed then an oval is drawing. 
        ....
        Graphics g = canvas.getGraphics();
        g.setColor( Color.WHITE);
        if ( e.isControlDown() )
          g.drawOval(start_point.x, start_point.y, end_point.x - start_point.x, end_point.y - start_point.y);
        else
          g.drawRect(start_point.x, start_point.y, end_point.x - start_point.x, end_point.y - start_point.y);
        //swap canvas buffers
        canvas.swap();
        ....

The rectangle is drawing normally but the oval is blinking during the draw.
Is this a bug or a feature?
 
Best regards!
Andrei Moisseev

Attachment: GraphicsDraw.java
Description: Binary data

Reply via email to