Examples of createGraphics()


Examples of java.awt.image.BufferedImage.createGraphics()

    public void generateActual(OutputStream out) throws Exception {
      Rectangle rect = mapContext.getViewport().getScreenArea();
      BufferedImage image = new BufferedImage((int) rect.getWidth(), (int) rect.getHeight(),
          BufferedImage.TYPE_4BYTE_ABGR);
      layer.draw(image.createGraphics(), mapContext, mapContext.getViewport());
      ImageIO.write(image, "PNG", out);
    }

  }
View Full Code Here

Examples of java.awt.image.BufferedImage.createGraphics()

    public void generateActual(OutputStream out) throws Exception {
      Rectangle rect = mapContext.getViewport().getScreenArea();
      BufferedImage image = new BufferedImage((int) rect.getWidth(), (int) rect.getHeight(),
          BufferedImage.TYPE_4BYTE_ABGR);
      layer.draw(image.createGraphics(), mapContext, mapContext.getViewport());
      ImageIO.write(image, "PNG", out);
    }

  }
View Full Code Here

Examples of java.awt.image.VolatileImage.createGraphics()

                    // put in cache for future
                    imageCache.setImage(buffer, config, w, h, this, extendedCacheKeys);
                }

                // create the graphics context with which to paint to the buffer
                Graphics2D bg = buffer.createGraphics();

                // clear the background before configuring the graphics
                bg.setComposite(AlphaComposite.Clear);
                bg.fillRect(0, 0, w, h);
                bg.setComposite(AlphaComposite.SrcOver);
View Full Code Here

Examples of javax.media.jai.TiledImage.createGraphics()

    public void testFlipTranslated() throws Exception {
        // build a translated image
        SampleModel sm = RasterFactory.createPixelInterleavedSampleModel(DataBuffer.TYPE_BYTE, 256, 256, 3);
        ColorModel cm = PlanarImage.createColorModel(sm);
        TiledImage ti = new TiledImage(-10, -10, 5, 5, 0, 0, sm, cm);
        Graphics2D g = ti.createGraphics();
        g.setColor(Color.GREEN);
        g.fillRect(-10, -10, 5, 5);
        g.dispose();
       
        // build a coverage around it
View Full Code Here

Examples of processing.core.PApplet.createGraphics()

                    .withWordPadding(4)
                    .withPlacer(Placers.centerClump());

            ImageConfiguration imageConfig = parseArgs(args, wordCram);

            PGraphics image = processing.createGraphics(imageConfig.width, imageConfig.height, JAVA2D);
            try {
                wordCram.withCustomCanvas(image);

                image.beginDraw();
                wordCram.drawAll();
View Full Code Here

Examples of sun.java2d.ScreenUpdateManager.createGraphics()

            if (font == null) {
                font = defaultFont;
            }
            ScreenUpdateManager mgr =
                ScreenUpdateManager.getInstance();
            return mgr.createGraphics(surfaceData, this, fgColor,
                                      bgColor, font);
        }
        return null;
    }
    public FontMetrics getFontMetrics(Font font) {
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.