Examples of clearRect()


Examples of ae.java.awt.Graphics.clearRect()

                        g.setClip(ra.paintRects[i]);
                        if (i == UPDATE) {
                            updateComponent(comp, g);
                        } else {
                            if (shouldClearRectBeforePaint) {
                                g.clearRect( ra.paintRects[i].x,
                                             ra.paintRects[i].y,
                                             ra.paintRects[i].width,
                                             ra.paintRects[i].height);
                            }
                            paintComponent(comp, g);
View Full Code Here

Examples of ae.java.awt.Graphics2D.clearRect()

    }

    private void initSurface(int width, int height) {
        Graphics2D g2 = createGraphics();
        try {
            g2.clearRect(0, 0, width, height);
        } finally {
            g2.dispose();
        }
    }
View Full Code Here

Examples of com.emitrom.lienzo.client.core.Context2D.clearRect()

    {
        Context2D context = getContext();

        if (null != context)
        {
            context.clearRect(0, 0, m_wide, m_high);
        }
    }

    public final int getWidth()
    {
View Full Code Here

Examples of com.google.code.appengine.awt.Graphics2D.clearRect()

            image.getWidth(),
            image.getHeight(),
            BufferedImage.TYPE_INT_RGB);
        Graphics2D g = (Graphics2D)bufferedImage.getGraphics();
        g.setBackground(bkg);
        g.clearRect(0, 0, image.getWidth(), image.getHeight());
        g.drawRenderedImage(image, new AffineTransform());
        return bufferedImage;
    }

    public static byte[] getBytes(Image image, Color bkg, String code, int pad, ImageObserver observer) {
View Full Code Here

Examples of com.google.gwt.canvas.dom.client.Context2d.clearRect()

            public String getHash(String fontName)
            {
               ctx.setFont("57px " + fontName + ", " + defaultFontName);
               int width = canvas.getOffsetWidth();
               int height = canvas.getOffsetHeight();
               ctx.clearRect(0, 0, width, height);
               ctx.fillText("TheQuickBrownFox", 2, 50);
               return canvas.toDataUrl();
            }};
        
         // get hashes and compare them
View Full Code Here

Examples of com.tinyline.tiny2d.Tiny2D.clearRect()

        Tiny2D t2d = new Tiny2D(pixbuf);
        t2d.antialias = true;
        TinyRect clip = t2d.getClip();
        t2d.devClip = clip;
        t2d.clearRect(clip);
        t2d.invalidate();
        return t2d;
    }

    private void setT2DPureMark(Tiny2D t2d, final Tile tile, boolean black) {
View Full Code Here

Examples of java.awt.Graphics.clearRect()

            x += delta.getX();
            y += delta.getY();
          }
          x = (int) Math.round(zoom * x);
          y = (int) Math.round(zoom * y);
          gCopy.clearRect(x - offs, y - offs, size, size);
          gCopy.drawRect(x - offs, y - offs, size, size);
        }
      }
      Handle selHandle = selection.getSelectedHandle();
      if (selHandle != null) {
View Full Code Here

Examples of java.awt.Graphics2D.clearRect()

      //prepare image
      peerloadPicture = new BufferedImage(width,height,BufferedImage.TYPE_INT_RGB);
        final Graphics2D g = peerloadPicture.createGraphics();
        g.setBackground(Color.decode("0x"+COL_LOAD_BG));
        g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
        g.clearRect(0,0,width,height);

        final int circ_w = Math.min(width,height)-20; //width of the circle (r*2)
        final int circ_x = width-circ_w-10;           //x-coordinate of circle-left
        final int circ_y = 10;                        //y-coordinate of circle-top
        int curr_angle = 0;                       //remember current angle
View Full Code Here

Examples of java.awt.Graphics2D.clearRect()

        final int bgG = (int) ((this.backgroundCol >> 8) & 0xff);
        final int bgB = (int) (this.backgroundCol & 0xff);

        final Graphics2D gr = image.createGraphics();
        gr.setBackground(new Color(bgR, bgG, bgB));
        gr.clearRect(0, 0, width, height);
    }
   
    public void setDrawMode(final DrawMode drawMode) {
        this.defaultMode = drawMode;
    }
View Full Code Here

Examples of java.awt.Graphics2D.clearRect()

      // super.paint( g );
      final Graphics2D g2d = (Graphics2D) g;
      g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
          RenderingHints.VALUE_ANTIALIAS_ON);
      g2d.setBackground(backgroundColor);
      g2d.clearRect(0, 0, this.getWidth(), this.getHeight());
      final GradientPaint gp = new GradientPaint(0f, 0f, backgroundColor, 0f,
          this.getHeight() / 2.f, textColor, true);
      g2d.setPaint(gp);
      g2d.setFont(font);
      final FontMetrics metrics = g2d.getFontMetrics();
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.