Examples of createGraphics()


Examples of com.sun.star.awt.XDevice.createGraphics()

        try {
            oObj = the_access.getControl(the_Model);
            the_win = the_access.getControl(the_Model).getPeer();
            the_kit = the_win.getToolkit();
            aDevice = the_kit.createScreenCompatibleDevice(200, 200);
            aGraphic = aDevice.createGraphics();
        } catch (com.sun.star.uno.Exception e) {
            log.println("Couldn't get GridControl");
            e.printStackTrace(log);
            throw new StatusException("Couldn't get GridControl", e);
        }
View Full Code Here

Examples of java.awt.GraphicsEnvironment.createGraphics()

            if (bufferedMapImage == null || bufferedRenderingImage == null) {
                createBuffers(w, h);
            }

            GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
            Graphics2D g = (Graphics2D) ge.createGraphics(bufferedMapImage);
            g.setClip(0, 0, w, h);
            Border border = mb.getBorder();
            mb.setBorder(null);
            mb.paintAll(g);
            mb.setBorder(border);
View Full Code Here

Examples of java.awt.GraphicsEnvironment.createGraphics()

     */
    public Graphics getGraphics(int width, int height, int imageType) {
        bufferedImage = new BufferedImage(width, height, imageType);

        GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
        Graphics g = ge.createGraphics(bufferedImage);
        g.setClip(0, 0, width, height);
        return g;
    }

    /**
 
View Full Code Here

Examples of java.awt.GraphicsEnvironment.createGraphics()

        int height = 256;
        int width = 256;

        BufferedImage bigImage = new BufferedImage(width * 6, height * 6, BufferedImage.TYPE_INT_RGB);
        GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
        Graphics g = ge.createGraphics(bigImage);
        Toolkit tk = Toolkit.getDefaultToolkit();

        for (int x = 0; x < 6; x++) {
            for (int y = 0; y < 6; y++) {
                int[] pixels = decompressSubframe(x, y, colortable);
View Full Code Here

Examples of java.awt.GraphicsEnvironment.createGraphics()

     */
    private static class ThreadGraphicsDispenser extends ThreadLocal {
        public Object initialValue() {
            BufferedImage bi = new BufferedImage(1, 1, BufferedImage.TYPE_INT_RGB);
            GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
            Graphics2D workingGraphics = ge.createGraphics(bi);
            return workingGraphics;
        }
    }

    private static ThreadGraphicsDispenser graphicsDispencer = new ThreadGraphicsDispenser();
View Full Code Here

Examples of java.awt.GraphicsEnvironment.createGraphics()

     *          image.
     */
    public Graphics2D createGraphics() {
  GraphicsEnvironment env =
      GraphicsEnvironment.getLocalGraphicsEnvironment();
  return env.createGraphics(this);
    }

    /**
     * Returns a subimage defined by a specified rectangular region.
     * The returned <code>BufferedImage</code> shares the same
View Full Code Here

Examples of java.awt.Image.createGraphics()

                    bounds, size);
            figure.transform(transform);

            BufferedImage image = new BufferedImage(x, y,
                    BufferedImage.TYPE_4BYTE_ABGR);
            Graphics2D graphics = image.createGraphics();

            if (antialias) {
                graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                        RenderingHints.VALUE_ANTIALIAS_ON);
            } else {
View Full Code Here

Examples of java.awt.SplashScreen.createGraphics()

    {

        SplashScreen splash = SplashScreen.getSplashScreen();
        if (splash != null)
        {
            Graphics2D g = (Graphics2D) splash.createGraphics();
            Rectangle size = splash.getBounds();
            g.setComposite(AlphaComposite.Clear);
            g.fillRect(0, 0, size.width, size.height);
            g.setPaintMode();
        }
View Full Code Here

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

           // create a BufferedImage of only 1 pixel height for fetching the rows
           // of the image in the correct format (ARGB)
           // This speeds up things by more than factor 2, compared to the standard
           // BufferedImage.getRGB solution
           BufferedImage row = new BufferedImage(width, 1, BufferedImage.TYPE_INT_ARGB);
           Graphics2D g2d = row.createGraphics();
           int pixels[] = ((DataBufferInt) row.getRaster().getDataBuffer()).getData();
           // make sure alpha values do not add up for each row:
           g2d.setComposite(AlphaComposite.Src);
           // calculate scanline by scanline in order to safe memory.
           // It also seems to run faster like that
View Full Code Here

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

               // create a BufferedImage of only 1 pixel height for fetching
               // the rows of the image in the correct format (ARGB)
               // This speeds up things by more than factor 2, compared to the
               // standard BufferedImage.getRGB solution
               BufferedImage row = new BufferedImage(width, 1, BufferedImage.TYPE_INT_ARGB);
               Graphics2D g2d = row.createGraphics();
               int pixels[] = ((DataBufferInt) row.getRaster().getDataBuffer()).getData();
               // make sure alpha values do not add up for each row:
               g2d.setComposite(AlphaComposite.Src);
               // calculate scanline by scanline in order to safe memory.
               // It also seems to run faster like that
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.