Java Code Examples for sun.awt.image.ImageRepresentation#drawToBufImage()

The following examples show how to use sun.awt.image.ImageRepresentation#drawToBufImage() . 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: DrawImage.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
public boolean copyImage(SunGraphics2D sg, Image img,
                         int dx, int dy, int sx, int sy, int w, int h,
                         Color bgColor,
                         ImageObserver observer) {
    if (!(img instanceof ToolkitImage)) {
        return copyImage(sg, img, dx, dy, sx, sy, w, h, bgColor);
    } else {
        ToolkitImage sunimg = (ToolkitImage)img;
        if (!imageReady(sunimg, observer)) {
            return false;
        }
        ImageRepresentation ir = sunimg.getImageRep();
        return ir.drawToBufImage(sg, sunimg,
                                 dx, dy, (dx + w), (dy + h),
                                 sx, sy, (sx + w), (sy + h),
                                 bgColor, observer);
    }
}
 
Example 2
Source File: DrawImage.java    From jdk8u_jdk with GNU General Public License v2.0 6 votes vote down vote up
public boolean scaleImage(SunGraphics2D sg, Image img,
                            int x, int y,
                            int width, int height,
                            Color bgColor,
                            ImageObserver observer) {
    if (!(img instanceof ToolkitImage)) {
        return scaleImage(sg, img, x, y, width, height, bgColor);
    } else {
        ToolkitImage sunimg = (ToolkitImage)img;
        if (!imageReady(sunimg, observer)) {
            return false;
        }
        ImageRepresentation ir = sunimg.getImageRep();
        return ir.drawToBufImage(sg, sunimg, x, y, width, height, bgColor,
                                 observer);
    }
}
 
Example 3
Source File: DrawImage.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
public boolean scaleImage(SunGraphics2D sg, Image img,
                          int dx1, int dy1, int dx2, int dy2,
                          int sx1, int sy1, int sx2, int sy2,
                          Color bgColor,
                          ImageObserver observer) {
    if (!(img instanceof ToolkitImage)) {
        return scaleImage(sg, img, dx1, dy1, dx2, dy2,
                          sx1, sy1, sx2, sy2, bgColor);
    } else {
        ToolkitImage sunimg = (ToolkitImage)img;
        if (!imageReady(sunimg, observer)) {
            return false;
        }
        ImageRepresentation ir = sunimg.getImageRep();
        return ir.drawToBufImage(sg, sunimg, dx1, dy1, dx2, dy2,
                                 sx1, sy1, sx2, sy2, bgColor, observer);
    }
}
 
Example 4
Source File: DrawImage.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
public boolean scaleImage(SunGraphics2D sg, Image img,
                            int x, int y,
                            int width, int height,
                            Color bgColor,
                            ImageObserver observer) {
    if (!(img instanceof ToolkitImage)) {
        return scaleImage(sg, img, x, y, width, height, bgColor);
    } else {
        ToolkitImage sunimg = (ToolkitImage)img;
        if (!imageReady(sunimg, observer)) {
            return false;
        }
        ImageRepresentation ir = sunimg.getImageRep();
        return ir.drawToBufImage(sg, sunimg, x, y, width, height, bgColor,
                                 observer);
    }
}
 
Example 5
Source File: DrawImage.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
public boolean copyImage(SunGraphics2D sg, Image img,
                         int dx, int dy, int sx, int sy, int w, int h,
                         Color bgColor,
                         ImageObserver observer) {
    if (!(img instanceof ToolkitImage)) {
        return copyImage(sg, img, dx, dy, sx, sy, w, h, bgColor);
    } else {
        ToolkitImage sunimg = (ToolkitImage)img;
        if (!imageReady(sunimg, observer)) {
            return false;
        }
        ImageRepresentation ir = sunimg.getImageRep();
        return ir.drawToBufImage(sg, sunimg,
                                 dx, dy, (dx + w), (dy + h),
                                 sx, sy, (sx + w), (sy + h),
                                 bgColor, observer);
    }
}
 
Example 6
Source File: DrawImage.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
public boolean copyImage(SunGraphics2D sg, Image img,
                         int dx, int dy, int sx, int sy, int w, int h,
                         Color bgColor,
                         ImageObserver observer) {
    if (!(img instanceof ToolkitImage)) {
        return copyImage(sg, img, dx, dy, sx, sy, w, h, bgColor);
    } else {
        ToolkitImage sunimg = (ToolkitImage)img;
        if (!imageReady(sunimg, observer)) {
            return false;
        }
        ImageRepresentation ir = sunimg.getImageRep();
        return ir.drawToBufImage(sg, sunimg,
                                 dx, dy, (dx + w), (dy + h),
                                 sx, sy, (sx + w), (sy + h),
                                 bgColor, observer);
    }
}
 
Example 7
Source File: DrawImage.java    From Bytecoder with Apache License 2.0 6 votes vote down vote up
public boolean scaleImage(SunGraphics2D sg, Image img,
                          int dx1, int dy1, int dx2, int dy2,
                          int sx1, int sy1, int sx2, int sy2,
                          Color bgColor,
                          ImageObserver observer) {
    if (!(img instanceof ToolkitImage)) {
        return scaleImage(sg, img, dx1, dy1, dx2, dy2,
                          sx1, sy1, sx2, sy2, bgColor);
    } else {
        ToolkitImage sunimg = (ToolkitImage)img;
        if (!imageReady(sunimg, observer)) {
            return false;
        }
        ImageRepresentation ir = sunimg.getImageRep();
        return ir.drawToBufImage(sg, sunimg, dx1, dy1, dx2, dy2,
                                 sx1, sy1, sx2, sy2, bgColor, observer);
    }
}
 
Example 8
Source File: DrawImage.java    From jdk8u-dev-jdk with GNU General Public License v2.0 6 votes vote down vote up
public boolean scaleImage(SunGraphics2D sg, Image img,
                          int dx1, int dy1, int dx2, int dy2,
                          int sx1, int sy1, int sx2, int sy2,
                          Color bgColor,
                          ImageObserver observer) {
    if (!(img instanceof ToolkitImage)) {
        return scaleImage(sg, img, dx1, dy1, dx2, dy2,
                          sx1, sy1, sx2, sy2, bgColor);
    } else {
        ToolkitImage sunimg = (ToolkitImage)img;
        if (!imageReady(sunimg, observer)) {
            return false;
        }
        ImageRepresentation ir = sunimg.getImageRep();
        return ir.drawToBufImage(sg, sunimg, dx1, dy1, dx2, dy2,
                                 sx1, sy1, sx2, sy2, bgColor, observer);
    }
}
 
Example 9
Source File: DrawImage.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
public boolean scaleImage(SunGraphics2D sg, Image img,
                          int dx1, int dy1, int dx2, int dy2,
                          int sx1, int sy1, int sx2, int sy2,
                          Color bgColor,
                          ImageObserver observer) {
    if (!(img instanceof ToolkitImage)) {
        return scaleImage(sg, img, dx1, dy1, dx2, dy2,
                          sx1, sy1, sx2, sy2, bgColor);
    } else {
        ToolkitImage sunimg = (ToolkitImage)img;
        if (!imageReady(sunimg, observer)) {
            return false;
        }
        ImageRepresentation ir = sunimg.getImageRep();
        return ir.drawToBufImage(sg, sunimg, dx1, dy1, dx2, dy2,
                                 sx1, sy1, sx2, sy2, bgColor, observer);
    }
}
 
Example 10
Source File: DrawImage.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
public boolean scaleImage(SunGraphics2D sg, Image img,
                          int dx1, int dy1, int dx2, int dy2,
                          int sx1, int sy1, int sx2, int sy2,
                          Color bgColor,
                          ImageObserver observer) {
    if (!(img instanceof ToolkitImage)) {
        return scaleImage(sg, img, dx1, dy1, dx2, dy2,
                          sx1, sy1, sx2, sy2, bgColor);
    } else {
        ToolkitImage sunimg = (ToolkitImage)img;
        if (!imageReady(sunimg, observer)) {
            return false;
        }
        ImageRepresentation ir = sunimg.getImageRep();
        return ir.drawToBufImage(sg, sunimg, dx1, dy1, dx2, dy2,
                                 sx1, sy1, sx2, sy2, bgColor, observer);
    }
}
 
Example 11
Source File: DrawImage.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
public boolean copyImage(SunGraphics2D sg, Image img,
                         int dx, int dy, int sx, int sy, int w, int h,
                         Color bgColor,
                         ImageObserver observer) {
    if (!(img instanceof ToolkitImage)) {
        return copyImage(sg, img, dx, dy, sx, sy, w, h, bgColor);
    } else {
        ToolkitImage sunimg = (ToolkitImage)img;
        if (!imageReady(sunimg, observer)) {
            return false;
        }
        ImageRepresentation ir = sunimg.getImageRep();
        return ir.drawToBufImage(sg, sunimg,
                                 dx, dy, (dx + w), (dy + h),
                                 sx, sy, (sx + w), (sy + h),
                                 bgColor, observer);
    }
}
 
Example 12
Source File: DrawImage.java    From jdk8u-dev-jdk with GNU General Public License v2.0 6 votes vote down vote up
public boolean copyImage(SunGraphics2D sg, Image img,
                         int dx, int dy, int sx, int sy, int w, int h,
                         Color bgColor,
                         ImageObserver observer) {
    if (!(img instanceof ToolkitImage)) {
        return copyImage(sg, img, dx, dy, sx, sy, w, h, bgColor);
    } else {
        ToolkitImage sunimg = (ToolkitImage)img;
        if (!imageReady(sunimg, observer)) {
            return false;
        }
        ImageRepresentation ir = sunimg.getImageRep();
        return ir.drawToBufImage(sg, sunimg,
                                 dx, dy, (dx + w), (dy + h),
                                 sx, sy, (sx + w), (sy + h),
                                 bgColor, observer);
    }
}
 
Example 13
Source File: DrawImage.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
public boolean scaleImage(SunGraphics2D sg, Image img,
                            int x, int y,
                            int width, int height,
                            Color bgColor,
                            ImageObserver observer) {
    if (!(img instanceof ToolkitImage)) {
        return scaleImage(sg, img, x, y, width, height, bgColor);
    } else {
        ToolkitImage sunimg = (ToolkitImage)img;
        if (!imageReady(sunimg, observer)) {
            return false;
        }
        ImageRepresentation ir = sunimg.getImageRep();
        return ir.drawToBufImage(sg, sunimg, x, y, width, height, bgColor,
                                 observer);
    }
}
 
Example 14
Source File: DrawImage.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public boolean transformImage(SunGraphics2D sg, Image img,
                              AffineTransform atfm,
                              ImageObserver observer) {
    if (!(img instanceof ToolkitImage)) {
        transformImage(sg, img, 0, 0, atfm, sg.interpolationType);
        return true;
    } else {
        ToolkitImage sunimg = (ToolkitImage)img;
        if (!imageReady(sunimg, observer)) {
            return false;
        }
        ImageRepresentation ir = sunimg.getImageRep();
        return ir.drawToBufImage(sg, sunimg, atfm, observer);
    }
}
 
Example 15
Source File: DrawImage.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public boolean transformImage(SunGraphics2D sg, Image img,
                              AffineTransform atfm,
                              ImageObserver observer) {
    if (!(img instanceof ToolkitImage)) {
        transformImage(sg, img, 0, 0, atfm, sg.interpolationType);
        return true;
    } else {
        ToolkitImage sunimg = (ToolkitImage)img;
        if (!imageReady(sunimg, observer)) {
            return false;
        }
        ImageRepresentation ir = sunimg.getImageRep();
        return ir.drawToBufImage(sg, sunimg, atfm, observer);
    }
}
 
Example 16
Source File: DrawImage.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
public boolean copyImage(SunGraphics2D sg, Image img,
                         int x, int y,
                         Color bgColor,
                         ImageObserver observer) {
    if (!(img instanceof ToolkitImage)) {
        return copyImage(sg, img, x, y, bgColor);
    } else {
        ToolkitImage sunimg = (ToolkitImage)img;
        if (!imageReady(sunimg, observer)) {
            return false;
        }
        ImageRepresentation ir = sunimg.getImageRep();
        return ir.drawToBufImage(sg, sunimg, x, y, bgColor, observer);
    }
}
 
Example 17
Source File: DrawImage.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public boolean copyImage(SunGraphics2D sg, Image img,
                         int x, int y,
                         Color bgColor,
                         ImageObserver observer) {
    if (!(img instanceof ToolkitImage)) {
        return copyImage(sg, img, x, y, bgColor);
    } else {
        ToolkitImage sunimg = (ToolkitImage)img;
        if (!imageReady(sunimg, observer)) {
            return false;
        }
        ImageRepresentation ir = sunimg.getImageRep();
        return ir.drawToBufImage(sg, sunimg, x, y, bgColor, observer);
    }
}
 
Example 18
Source File: DrawImage.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public boolean transformImage(SunGraphics2D sg, Image img,
                              AffineTransform atfm,
                              ImageObserver observer) {
    if (!(img instanceof ToolkitImage)) {
        transformImage(sg, img, 0, 0, atfm, sg.interpolationType);
        return true;
    } else {
        ToolkitImage sunimg = (ToolkitImage)img;
        if (!imageReady(sunimg, observer)) {
            return false;
        }
        ImageRepresentation ir = sunimg.getImageRep();
        return ir.drawToBufImage(sg, sunimg, atfm, observer);
    }
}
 
Example 19
Source File: DrawImage.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
public boolean copyImage(SunGraphics2D sg, Image img,
                         int x, int y,
                         Color bgColor,
                         ImageObserver observer) {
    if (!(img instanceof ToolkitImage)) {
        return copyImage(sg, img, x, y, bgColor);
    } else {
        ToolkitImage sunimg = (ToolkitImage)img;
        if (!imageReady(sunimg, observer)) {
            return false;
        }
        ImageRepresentation ir = sunimg.getImageRep();
        return ir.drawToBufImage(sg, sunimg, x, y, bgColor, observer);
    }
}
 
Example 20
Source File: DrawImage.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
public boolean copyImage(SunGraphics2D sg, Image img,
                         int x, int y,
                         Color bgColor,
                         ImageObserver observer) {
    if (!(img instanceof ToolkitImage)) {
        return copyImage(sg, img, x, y, bgColor);
    } else {
        ToolkitImage sunimg = (ToolkitImage)img;
        if (!imageReady(sunimg, observer)) {
            return false;
        }
        ImageRepresentation ir = sunimg.getImageRep();
        return ir.drawToBufImage(sg, sunimg, x, y, bgColor, observer);
    }
}