Did anyone check if the poor performance of active rendering under Mac OS X is a consequence of not creating screen compatible images? Examples of screen compatible images appear below.
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice gs = ge.getDefaultScreenDevice();
GraphicsConfiguration gc = gs.getDefaultConfiguration();
// Create an image that does not support transparency
bimage = gc.createCompatibleImage(width, height, Transparency.OPAQUE);
// Create an image that supports transparent pixels
bimage = gc.createCompatibleImage(width, height, Transparency.BITMASK);
// Create an image that supports arbitrary levels of transparency
bimage = gc.createCompatibleImage(width, height, Transparency.TRANSLUCENT);
Graphics2D g2d = (Graphics2D)g;
int width = 100;
int height = 100;
// Create an image that does not support transparency
BufferedImage bimage = g2d.getDeviceConfiguration().createCompatibleImage(
width, height, Transparency.OPAQUE);
// Create an image that supports transparent pixels
bimage = g2d.getDeviceConfiguration().createCompatibleImage(
width, height, Transparency.BITMASK);
// Create an image that supports arbitrary levels of transparency
bimage = g2d.getDeviceConfiguration().createCompatibleImage(
width, height, Transparency.TRANSLUCENT);
BufferedImage bimage = (BufferedImage)component.createImage(width, height);
if (bimage == null) {
// The component is not visible on the screen
}