Package java.awt

Examples of java.awt.Graphics2D.fill()


        Graphics2D g2 = (Graphics2D) g;
       
        GradientPaint paint = new GradientPaint(0, 0, gradientStartColor,
                0, getHeight(), gradientEndColor);
        g2.setPaint(paint);
        g2.fill(g2.getClip());
    }
}
View Full Code Here


      textAt.rotate(cf.getRotation());
      textAt.shear(cf.getShearX(), cf.getShearY());
      shape = text.getOutline(textAt);
      curWidth += shape.getBounds().getWidth();
      gfx.setXORMode(Color.BLACK);
      gfx.fill(shape);
    }

    // XOR circle
    int dx = randomInt(rng, width, 2 * width);
    int dy = randomInt(rng, width, 2 * height);
 
View Full Code Here

            double dx = (getWidth() - r*rc.getWidth())/2;
            double dy = (getHeight() - r*rc.getHeight())/2;
            g2d.translate(dx, dy);
            g2d.scale(r, r);
            g2d.setColor(Color.WHITE);
            g2d.fill(rc);
            g2d.setColor(Color.BLACK);
            g2d.draw(rc);
            rc = format == null
                    ? pageLayout.getDrawableArea(Unit.PT)
                    : pageLayout.getDrawableArea(format);
View Full Code Here

            g2.fillRect(0, 0, getWidth(), getHeight());

            for (int i = 0; i < tmpTicker.bars.length; i++) {
                int channel = 224 - 128 / (i + 1);
                g2.setColor(new Color(channel, channel, channel, alphaLevel));
                g2.fill(tmpTicker.bars[i]);
            }

            double textMaxY = drawTextAt(text, getFont(), g2, width,
                    tmpTicker.maxY, getForeground());
View Full Code Here

     
      // drawing rectangol
      for(Ns3ConfigurationDataObj rectNode: n3NodeContainer){
      
          g2D.setColor(Color.BLUE);
          g2D.fill(rectNode.getNodeRect());
           }
    }
   
    public void drawHighlightSquares(Graphics2D g2D, Rectangle2D r) {
      double x = r.getX();
View Full Code Here

     
      @Override
      public void paintComponent(Graphics g){
        Graphics2D myGraphics =(Graphics2D)(g.create());
        myGraphics.setColor(selectionColor);
        myGraphics.fill(selection);
        myGraphics.setStroke(myStroke);
        myGraphics.setColor(strokeColor);
        myGraphics.draw(selection);
        myGraphics.dispose();
      }
View Full Code Here

      textAt.rotate(cf.getRotation());
      textAt.shear(cf.getShearX(), cf.getShearY());
      shape = text.getOutline(textAt);
      curWidth += shape.getBounds().getWidth();
      gfx.setXORMode(Color.BLACK);
      gfx.fill(shape);
    }

    // XOR circle
    int dx = randomInt(rng, width, 2 * width);
    int dy = randomInt(rng, width, 2 * height);
 
View Full Code Here

                Graphics2D g2d = (Graphics2D)g;
    if (xorMode) {
        g2d.setColor(Color.black);
        g2d.setXORMode(Color.white);
        g2d.fill(s);
    } else {
        g2d.setColor(selectionOverlayColor);
        g2d.fill(s);
        if (selectionOverlayStrokeColor != null) {
      g2d.setStroke(new java.awt.BasicStroke(1.0f));
View Full Code Here

        g2d.setColor(Color.black);
        g2d.setXORMode(Color.white);
        g2d.fill(s);
    } else {
        g2d.setColor(selectionOverlayColor);
        g2d.fill(s);
        if (selectionOverlayStrokeColor != null) {
      g2d.setStroke(new java.awt.BasicStroke(1.0f));
      g2d.setColor(selectionOverlayStrokeColor);
      g2d.draw(s);
        }
View Full Code Here

                        Graphics2D big2d = createGraphics
                            (bi, g2d.getRenderingHints());

                        big2d.translate(-clipR.x, -clipR.y);
                        big2d.setPaint(Color.white);
                        big2d.fill(clip);
                        big2d.dispose();

                        CachableRed cCr;
                        cCr = new BufferedImageCachableRed(bi, clipR.x,
                                                           clipR.y);
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.