Examples of clearRect()


Examples of java.awt.Graphics2D.clearRect()

    final Graphics2D g = (Graphics2D) graphics.create();
    // draw background
    if (background != null)
    {
      g.setBackground(background);
      g.clearRect(0, 0, (int) drawArea.getWidth(), (int) drawArea.getHeight());
    }

    g.translate(drawArea.getX() - adjustX, drawArea.getY() - adjustY);
    final int radius = (int) (drawArea.getWidth() < drawArea.getHeight() ? drawArea.getWidth() : drawArea.getHeight());
    // draw a filled circle form its center to its edge with the background color
View Full Code Here

Examples of java.awt.Graphics2D.clearRect()

    final Graphics2D g = (Graphics2D) g2.create();
    g.translate(drawArea.getX(), drawArea.getY());
    if (background != null)
    {
      g.setBackground(background);
      g.clearRect(0, 0, (int) drawArea.getWidth(), height);
    }

    if (data == null || data.length == 0)
    {
      g.dispose();
View Full Code Here

Examples of java.awt.Graphics2D.clearRect()

    Graphics2D g = thumbnail.createGraphics();
    try {
      g.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
          RenderingHints.VALUE_INTERPOLATION_BICUBIC);
      g.setBackground(Color.BLACK);
      g.clearRect(0, 0, thumbnailWidth, thumbnailHeight);
      g.drawImage(image, 0, 0, thumbnailWidth, thumbnailHeight, null);
    } finally {
      g.dispose();
    }
    return thumbnail;
View Full Code Here

Examples of java.awt.Graphics2D.clearRect()

     
      try {
        if (data._bgColor != 0) {
          Color color = new Color(data._bgColor);
          graphics.setBackground(color);
          graphics.clearRect(0, 0, data._width, data._height);
        }
       
        MethodBinding paint = (MethodBinding) UIComponentBase.restoreAttachedState(facesContext, data._paint);
        paint.invoke(facesContext, new Object[] {graphics,data._data});
      } finally {
View Full Code Here

Examples of java.awt.Graphics2D.clearRect()

      // Copy the scaled image into the new one
      BufferedImage imageBuf = new BufferedImage(chosenWidth, chosenHeight, BufferedImage.TYPE_INT_RGB);
      Graphics2D newImage = imageBuf.createGraphics();
      newImage.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
      newImage.setBackground(hexToColor(bgColor)); // Set the background color
      newImage.clearRect(0, 0, chosenWidth, chosenHeight);
      newImage.drawImage(imgScaled, getImageOffset(chosenWidth, newWidth), getImageOffset(chosenHeight, newHeight),
         newWidth, newHeight, null);

      return imageBuf;
   }
View Full Code Here

Examples of java.awt.Graphics2D.clearRect()

      // Copy the scaled image into the new one
      BufferedImage imageBuf = new BufferedImage(chosenWidth, chosenHeight, BufferedImage.TYPE_INT_RGB);
      Graphics2D newImage = imageBuf.createGraphics();
      newImage.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
      newImage.setBackground(hexToColor(bgColor)); // Set the background color
      newImage.clearRect(0, 0, chosenWidth, chosenHeight);
      newImage.drawImage(imgScaled, getImageOffset(chosenWidth, newWidth), getImageOffset(chosenHeight, newHeight),
         newWidth, newHeight, null);

      return imageBuf;
   }
View Full Code Here

Examples of java.awt.Graphics2D.clearRect()

        Dimension pageDimension = new Dimension( (int)widthPt, (int)heightPt );
           
        BufferedImage retval = new BufferedImage( widthPx, heightPx, imageType );
        Graphics2D graphics = (Graphics2D)retval.getGraphics();
        graphics.setBackground( Color.WHITE );
        graphics.clearRect( 0, 0, retval.getWidth(), retval.getHeight() );
        graphics.scale( scaling, scaling );
        PageDrawer drawer = new PageDrawer();
        drawer.drawPage( graphics, this, pageDimension );

        //TODO This could be done directly by manipulating the transformation matrix before painting.
View Full Code Here

Examples of java.awt.Graphics2D.clearRect()

            ProjectPlugin.trace(getClass(), "", null); //$NON-NLS-1$
        }
        Graphics2D graphics = getImage().createGraphics();
        graphics.setBackground(new Color(0, 0, 0, 0));
//        graphics.setTransform(new AffineTransform());
        graphics.clearRect(paintArea.x, paintArea.y, paintArea.width, paintArea.height);
        graphics.dispose();
    }

    public void setStatus( int status ) {
        if (layerInternal != null && !(layerInternal instanceof SelectionLayer))
View Full Code Here

Examples of java.awt.Graphics2D.clearRect()

                    RGB background = PreferenceConverter.getColor(store, PreferenceConstants.P_BACKGROUND);
                    map.getBlackboard().put(ProjectBlackboardConstants.MAP__BACKGROUND_COLOR, new Color(background.red, background.green, background.blue ));
                    object = map.getBlackboard().get(ProjectBlackboardConstants.MAP__BACKGROUND_COLOR);
                }
                g.setBackground((Color) object);
                g.clearRect(0,0,copy.getWidth(), copy.getHeight());
               
                SortedSet<RenderExecutor> executors;
                synchronized (childrenRenderers) {
                    executors = new TreeSet<RenderExecutor>(comparator);
                    executors.addAll(getRenderExecutors());
View Full Code Here

Examples of java.awt.Graphics2D.clearRect()

                    RGB background = PreferenceConverter.getColor(store, PreferenceConstants.P_BACKGROUND);
                    map.getBlackboard().put(ProjectBlackboardConstants.MAP__BACKGROUND_COLOR, new Color(background.red, background.green, background.blue ));
                    object = map.getBlackboard().get(ProjectBlackboardConstants.MAP__BACKGROUND_COLOR);
                }
                g.setBackground((Color) object);
                g.clearRect(0,0,copy.getWidth(), copy.getHeight());
               
                SortedSet<RenderExecutor> executors;
                synchronized (renderExecutors) {
                    executors = new TreeSet<RenderExecutor>(comparator);
                    executors.addAll(getRenderExecutors());
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.