}
} else {
System.err.println("No screen rendering checks.");
}
VolatileImage vi = gc.createCompatibleVolatileImage(512, 512);
vi.validate(gc);
long timeStarted = System.currentTimeMillis();
while (!done && (System.currentTimeMillis() - timeStarted) < RUN_TIME) {
if (++cnt > 100) {
int w = frame.getWidth() + incW;
int h = frame.getHeight() + incH;
if (w < minW || w > maxW ) {
incW = -incW;
}
if (h < minH || h > maxH ) {
incH = -incH;
}
frame.setSize(w, h);
cnt = 0;
}
// try to put the device into non-default state, for example,
// this operation below will set the transform
vi.validate(gc);
Graphics2D vig = (Graphics2D)vi.getGraphics();
vig.rotate(30.0f, vi.getWidth()/2, vi.getHeight()/2);
vig.drawImage(output, 0, 0,
vi.getWidth(), vi.getHeight(), null);
Insets in = frame.getInsets();
frame.getGraphics().drawImage(output, in.left, in.top, null);
if (cnt == 90 && robot != null) {
// area where we blitted to should be either white or green