Search in sources :

Example 1 with OffScreenImage

use of sun.awt.image.OffScreenImage in project jdk8u_jdk by JetBrains.

the class Win32GraphicsConfig method createAcceleratedImage.

/**
     * Creates a new managed image of the given width and height
     * that is associated with the target Component.
     */
public Image createAcceleratedImage(Component target, int width, int height) {
    ColorModel model = getColorModel(Transparency.OPAQUE);
    WritableRaster wr = model.createCompatibleWritableRaster(width, height);
    return new OffScreenImage(target, model, wr, model.isAlphaPremultiplied());
}
Also used : DirectColorModel(java.awt.image.DirectColorModel) ColorModel(java.awt.image.ColorModel) WritableRaster(java.awt.image.WritableRaster) OffScreenImage(sun.awt.image.OffScreenImage)

Example 2 with OffScreenImage

use of sun.awt.image.OffScreenImage in project jdk8u_jdk by JetBrains.

the class GLXGraphicsConfig method createAcceleratedImage.

/**
     * Creates a new hidden-acceleration image of the given width and height
     * that is associated with the target Component.
     */
@Override
public Image createAcceleratedImage(Component target, int width, int height) {
    ColorModel model = getColorModel(Transparency.OPAQUE);
    WritableRaster wr = model.createCompatibleWritableRaster(width, height);
    return new OffScreenImage(target, model, wr, model.isAlphaPremultiplied());
}
Also used : DirectColorModel(java.awt.image.DirectColorModel) ColorModel(java.awt.image.ColorModel) WritableRaster(java.awt.image.WritableRaster) OffScreenImage(sun.awt.image.OffScreenImage)

Example 3 with OffScreenImage

use of sun.awt.image.OffScreenImage in project jdk8u_jdk by JetBrains.

the class X11GraphicsConfig method createAcceleratedImage.

/**
     * Creates a new hidden-acceleration image of the given width and height
     * that is associated with the target Component.
     */
public Image createAcceleratedImage(Component target, int width, int height) {
    // As of 1.7 we no longer create pmoffscreens here...
    ColorModel model = getColorModel(Transparency.OPAQUE);
    WritableRaster wr = model.createCompatibleWritableRaster(width, height);
    return new OffScreenImage(target, model, wr, model.isAlphaPremultiplied());
}
Also used : DirectColorModel(java.awt.image.DirectColorModel) ComponentColorModel(java.awt.image.ComponentColorModel) ColorModel(java.awt.image.ColorModel) WritableRaster(java.awt.image.WritableRaster) OffScreenImage(sun.awt.image.OffScreenImage)

Example 4 with OffScreenImage

use of sun.awt.image.OffScreenImage in project jdk8u_jdk by JetBrains.

the class CGLGraphicsConfig method createAcceleratedImage.

@Override
public Image createAcceleratedImage(Component target, int width, int height) {
    ColorModel model = getColorModel(Transparency.OPAQUE);
    WritableRaster wr = model.createCompatibleWritableRaster(width, height);
    return new OffScreenImage(target, model, wr, model.isAlphaPremultiplied());
}
Also used : DirectColorModel(java.awt.image.DirectColorModel) ColorModel(java.awt.image.ColorModel) WritableRaster(java.awt.image.WritableRaster) OffScreenImage(sun.awt.image.OffScreenImage)

Aggregations

ColorModel (java.awt.image.ColorModel)4 DirectColorModel (java.awt.image.DirectColorModel)4 WritableRaster (java.awt.image.WritableRaster)4 OffScreenImage (sun.awt.image.OffScreenImage)4 ComponentColorModel (java.awt.image.ComponentColorModel)1