Java Code Examples for sun.java2d.loops.SurfaceType#Custom

The following examples show how to use sun.java2d.loops.SurfaceType#Custom . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MultiResolutionDrawImageWithTransformTest.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public TestSurfaceData(int width, int height, double scale) {
    super(StateTrackable.State.DYNAMIC, SurfaceType.Custom, ColorModel.getRGBdefault());
    this.scale = scale;
    gc = new TestGraphicsConfig(scale);
    this.width = (int) Math.ceil(scale * width);
    this.height = (int) Math.ceil(scale * height);
    buffImage = new BufferedImage(this.width, this.height,
            BufferedImage.TYPE_INT_RGB);

    Graphics imageGraphics = buffImage.createGraphics();
    imageGraphics.setColor(BACKGROUND_COLOR);
    imageGraphics.fillRect(0, 0, this.width, this.height);
    imageGraphics.dispose();
}
 
Example 2
Source File: MultiResolutionRenderingHintsTest.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public TestSurfaceData(int width, int height, double scale) {
    super(StateTrackable.State.DYNAMIC, SurfaceType.Custom, ColorModel.getRGBdefault());
    this.scale = scale;
    gc = new TestGraphicsConfig(scale);
    this.width = (int) Math.ceil(scale * width);
    this.height = (int) Math.ceil(scale * height);
    buffImage = new BufferedImage(this.width, this.height,
            BufferedImage.TYPE_INT_RGB);
}
 
Example 3
Source File: MultiResolutionDrawImageWithTransformTest.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
public TestSurfaceData(int width, int height, double scale) {
    super(StateTrackable.State.DYNAMIC, SurfaceType.Custom, ColorModel.getRGBdefault());
    this.scale = scale;
    gc = new TestGraphicsConfig(scale);
    this.width = (int) Math.ceil(scale * width);
    this.height = (int) Math.ceil(scale * height);
    buffImage = new BufferedImage(this.width, this.height,
            BufferedImage.TYPE_INT_RGB);

    Graphics imageGraphics = buffImage.createGraphics();
    imageGraphics.setColor(BACKGROUND_COLOR);
    imageGraphics.fillRect(0, 0, this.width, this.height);
    imageGraphics.dispose();
}
 
Example 4
Source File: MultiResolutionRenderingHintsTest.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
public TestSurfaceData(int width, int height, double scale) {
    super(StateTrackable.State.DYNAMIC, SurfaceType.Custom, ColorModel.getRGBdefault());
    this.scale = scale;
    gc = new TestGraphicsConfig(scale);
    this.width = (int) Math.ceil(scale * width);
    this.height = (int) Math.ceil(scale * height);
    buffImage = new BufferedImage(this.width, this.height,
            BufferedImage.TYPE_INT_RGB);
}