Package java.awt

Examples of java.awt.GraphicsConfiguration.createCompatibleImage()


    GraphicsConfiguration graphicsConfiguration = GraphicsEnvironment
        .getLocalGraphicsEnvironment()
        .getDefaultScreenDevice()
        .getDefaultConfiguration();
     
    BufferedImage acceleratedImage = graphicsConfiguration.createCompatibleImage(
        image.getWidth(null),
        image.getHeight(null),
        Transparency.BITMASK);
   
    Graphics graphicsForAcceleratedImage = acceleratedImage.getGraphics();
View Full Code Here


                    || (this.chartBufferWidth != available.getWidth())
                    || (this.chartBufferHeight != available.getHeight())) {
                this.chartBufferWidth = (int) available.getWidth();
                this.chartBufferHeight = (int) available.getHeight();
                GraphicsConfiguration gc = g2.getDeviceConfiguration();
                this.chartBuffer = gc.createCompatibleImage(
                        this.chartBufferWidth, this.chartBufferHeight,
                        Transparency.TRANSLUCENT);
                this.refreshBuffer = true;
            }
View Full Code Here

            // Paint the display into an offscreen buffer
            GraphicsConfiguration gc = graphics.getDeviceConfiguration();
            java.awt.Rectangle clipBounds = graphics.getClipBounds();
            java.awt.image.BufferedImage bufferedImage =
                gc.createCompatibleImage(clipBounds.width, clipBounds.height,
                    Transparency.OPAQUE);

            if (bufferedImage != null) {
                Graphics2D bufferedImageGraphics = (Graphics2D)bufferedImage.getGraphics();
                bufferedImageGraphics.setClip(0, 0, clipBounds.width, clipBounds.height);
View Full Code Here

 
  public BufferedImage createCompatibleImage(int w, int h, int transparency) {
    Window window = device.getFullScreenWindow();
    if (window != null) {
      GraphicsConfiguration gc = window.getGraphicsConfiguration();
      return gc.createCompatibleImage(w, h, transparency);
    }
    return null;
  }
}
View Full Code Here

    int w = busy.getIcon().getIconWidth();
    int h = busy.getIcon().getIconHeight();
    GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
    GraphicsDevice gd = ge.getDefaultScreenDevice();
    GraphicsConfiguration gc = gd.getDefaultConfiguration();
    BufferedImage image = gc.createCompatibleImage(w, h);
    Graphics2D g = image.createGraphics();
    busy.getIcon().paintIcon(null, g, 0, 0);
    PointFilter pf = new InvertFilter();
    pf.filter(image, image);
    g.dispose();
View Full Code Here

   */
  protected void createBufferedImage(int width, int height) {
    GraphicsConfiguration graphicsConfig = getGraphicsConfiguration();
    if (graphicsConfig != null) {
      try {
        offscreen = graphicsConfig.createCompatibleImage(width, height,
            (isOpaque()) ? Transparency.OPAQUE
                : Transparency.TRANSLUCENT);
      } catch (OutOfMemoryError e) {
        offscreen = null;
        offgraphics = null;
View Full Code Here

   */
  public BufferedImage createCompatibleImage(int w, int h, int transparancy) {
    Window window = device.getFullScreenWindow();
    if (window != null) {
      GraphicsConfiguration gc = window.getGraphicsConfiguration();
      return gc.createCompatibleImage(w, h, transparancy);
    }
    return null;
  }
}

View Full Code Here

  //create image compatible with monitor
  public BufferedImage createCompatibleImage(int w, int h, int t) {
    Window win = vc.getFullScreenWindow();
    if(win != null) {
      GraphicsConfiguration gc = win.getGraphicsConfiguration();
      return gc.createCompatibleImage(w, h, t);
    }
    return null;
  }
 
}
View Full Code Here

                    || (this.chartBufferWidth != available.getWidth())
                    || (this.chartBufferHeight != available.getHeight())) {
                this.chartBufferWidth = (int) available.getWidth();
                this.chartBufferHeight = (int) available.getHeight();
                GraphicsConfiguration gc = g2.getDeviceConfiguration();
                this.chartBuffer = gc.createCompatibleImage(
                        this.chartBufferWidth, this.chartBufferHeight,
                        Transparency.TRANSLUCENT);
                this.refreshBuffer = true;
                clearBuffer = false// buffer is new, no clearing required
            }
View Full Code Here

                boolean hasAlpha) {
            GraphicsEnvironment ge = GraphicsEnvironment
                    .getLocalGraphicsEnvironment();
            GraphicsDevice gd = ge.getDefaultScreenDevice();
            GraphicsConfiguration gc = gd.getDefaultConfiguration();
            return gc.createCompatibleImage(width, height,
                    Transparency.TRANSLUCENT);
        }

        public BufferedImage getGrayscaleBufferedImage(int width, int height,
                boolean hasAlpha) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.