import Graphics2D; import graphics2d.Graphics2DFramework; // Variables to store the point's position int x = 0; int y = 0; // Called repeatedly at screen refresh intervals // (several times per second) void onPaint ( int rendererID ) { // Set the background color to gray setGraphics2DColor( rendererID, 200, 200, 200, 255 ); // Set the drawing color to blue setDrawColor( rendererID, 0, 0, 255, 255 ); // Draw a point drawPoint( rendererID, x, y, 20, true ); } // Called repeatedly to update state for animation void onUpdate ( int rendererID ) { // Gradually move the point x += 2; y += 1; }