Examples of clearRect()


Examples of java.awt.Graphics2D.clearRect()

       
        Graphics2D g = screen.createGraphics();

        //clear existing image
        g.setBackground(new Color(0, 0, 0, 0));
        g.clearRect(0,0, getMapDisplay().getWidth(), getMapDisplay().getHeight());
       
        //update screen tile states
        for( Iterator<Object> iterator = tileCache.getKeys().iterator(); iterator.hasNext(); ) {
            ReferencedEnvelope referencedEnvelope = (ReferencedEnvelope) iterator.next();
            Tile t = (Tile)tileCache.get(referencedEnvelope);
View Full Code Here

Examples of javafx.scene.canvas.GraphicsContext.clearRect()

        GraphicsContext ctx = getGraphicsContext2D();
        ctx.save();
        double width = getWidth();
        double height = getHeight();
        if (width > 0 && height > 0) {
            ctx.clearRect(0, 0, width, height);
            this.info = new ChartRenderingInfo();
            this.chart.draw(this.g2, new Rectangle((int) width, (int) height),
                    this.anchor, this.info);
        }
        ctx.restore();
View Full Code Here

Examples of org.locationtech.udig.ui.graphics.SWTGraphics.clearRect()

        image = new Image(display, 16, 16);

        SWTGraphics graphics = new SWTGraphics(image, display);
        graphics.getGraphics(GC.class).setAntialias(SWT.OFF);
        graphics.setBackground(Color.WHITE);
        graphics.clearRect(0, 0, 16, 16);
        d.drawFeature(graphics, d.feature(d.polygon(new int[]{2, 2, 2, 14, 14, 14, 14, 2, 2, 2})),
                new AffineTransform(), rule);
        graphics.dispose();
        int blue = image.getImageData().palette.getPixel(new RGB(Color.BLUE.getRed(), Color.BLUE
                .getGreen(), Color.BLUE.getBlue()));
View Full Code Here

Examples of org.locationtech.udig.ui.graphics.SWTGraphics.clearRect()

        image = new Image(display, 16, 16);

        SWTGraphics graphics = new SWTGraphics(image, display);
        graphics.getGraphics(GC.class).setAntialias(SWT.OFF);
        graphics.setBackground(Color.WHITE);
        graphics.clearRect(0, 0, 16, 16);
        d.drawFeature(graphics, d.feature(line), style, new AffineTransform());
        graphics.dispose();
        int blue = image.getImageData().palette.getPixel(new RGB(Color.BLUE.getRed(), Color.BLUE
                .getGreen(), Color.BLUE.getBlue()));
        int white = image.getImageData().palette.getPixel(new RGB(Color.WHITE.getRed(), Color.WHITE
View Full Code Here

Examples of org.locationtech.udig.ui.graphics.SWTGraphics.clearRect()

        image = new Image(display, 16, 16);

        SWTGraphics graphics = new SWTGraphics(image, display);
        graphics.getGraphics(GC.class).setAntialias(SWT.OFF);
        graphics.setBackground(Color.WHITE);
        graphics.clearRect(0, 0, 16, 16);
        d.drawFeature(graphics, d.feature(point), style, new AffineTransform());
        graphics.dispose();
        int blue = image.getImageData().palette.getPixel(new RGB(Color.BLUE.getRed(), Color.BLUE.getGreen(), Color.BLUE.getBlue()));
        int white = image.getImageData().palette.getPixel(new RGB(Color.WHITE.getRed(), Color.WHITE.getGreen(), Color.WHITE.getBlue()));
View Full Code Here

Examples of org.locationtech.udig.ui.graphics.ViewportGraphics.clearRect()

            scaleDenom = ((Double)value).doubleValue();
        }
       
        if (configBean.getBackgroundColor() != null) {
            g.setBackground(configBean.getBackgroundColor());
            g.clearRect(0, 0, configBean.getWidth(), configBean.getHeight());
        }
        g.setColor(configBean.getTextColor());
        g.setFont(configBean.getFont());
        String denomStr = configBean.getNumberFormat().format(scaleDenom);
        int horizAlignment;
View Full Code Here

Examples of org.locationtech.udig.ui.graphics.ViewportGraphics.clearRect()

        Image image = new Image(Display.getDefault(), width, height);
        SimpleFeature feature = sampleFeature(layer);
        ViewportGraphics graphics = Drawing.createGraphics(new GC(image), Display.getDefault(),
                new Dimension(width - 1, width - 1));
        graphics.clearRect(0, 0, width, height);
        // graphics.clearRect(0,0,16,16);
        AffineTransform transform = Drawing.worldToScreenTransform(feature.getBounds(),
                new Rectangle(1, 0, width - 1, width - 1));
        // Drawing.createGraphics(image.createGraphics());
        Drawing.create().drawFeature(graphics, feature, transform, styleObject);
View Full Code Here

Examples of org.timepedia.chronoscope.client.canvas.Layer.clearRect()

    Layer layer = getLayer(layerId);
    if (layer == null) {
      layer = new LayerJava2D(this, layerId, b);
      id2Layer.put(layer.getLayerId(), layer);
      layer.setFillColor(Color.TRANSPARENT);
      layer.clearRect(0, 0, layer.getWidth(), layer.getHeight());
    }
    return layer;
  }

  public LinearGradient createLinearGradient(double startx, double starty,
View Full Code Here

Examples of railo.runtime.img.Image.clearRect()

    if (width < 0)
        throw new FunctionException(pc,"ImageClearRect",3,"width","width must contain a none negative value");
    if (height < 0)
        throw new FunctionException(pc,"ImageClearRect",4,"height","width must contain a none negative value");
   
    img.clearRect((int)x, (int)y, (int)width, (int)height);
    return null;
  }
 
}
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.