Package java.awt

Examples of java.awt.Graphics2D.fill()


        g.transform(transform);
        final AffineTransform inv = transform.createInverse();
        Shape fillRect = new Rectangle2D.Double(0, 0, img.getWidth(), img.getHeight());
        fillRect = inv.createTransformedShape(fillRect);
        g.setPaint(paint);
        g.fill(fillRect);
        if (invert)
        {
          final AffineTransform tx = new AffineTransform();
          tx.scale(1, -1);
          tx.translate(-xoffset, -yoffset);
View Full Code Here


        final Rectangle rect = new Rectangle(0, 0, image.getWidth(), image.getHeight());
        // prepare the image by filling it ...
        final Graphics2D g2 = image.createGraphics();
        g2.setPaint(Color.white);
        g2.fill(rect);

        final PageDrawable pageDrawable = prc.getPageDrawable(i);
        pageDrawable.draw(g2, rect);
        g2.dispose();
View Full Code Here

        if (arrowHeadType == OMArrowHead.ARROWHEAD_DIRECTION_FORWARD
                || arrowHeadType == OMArrowHead.ARROWHEAD_DIRECTION_BOTH) {
            int rightWingX = (int) ((float) width * .75);
            poly = new Polygon(new int[] { width, rightWingX, rightWingX }, new int[] {
                    middleY, upTip, downTip }, 3);
            g.fill(poly);
            g.draw(poly); // Seems to help with rendering problem.
        }

        if (arrowHeadType == OMArrowHead.ARROWHEAD_DIRECTION_BACKWARD
                || arrowHeadType == OMArrowHead.ARROWHEAD_DIRECTION_BOTH) {
View Full Code Here

        if (arrowHeadType == OMArrowHead.ARROWHEAD_DIRECTION_BACKWARD
                || arrowHeadType == OMArrowHead.ARROWHEAD_DIRECTION_BOTH) {
            int leftWingX = (int) ((float) width * .25);
            poly = new Polygon(new int[] { 0, leftWingX, leftWingX }, new int[] {
                    middleY, upTip, downTip }, 3);
            g.fill(poly);
            g.draw(poly); // Seems to help with rendering problem.
        }

        return new ImageIcon(bigImage);
    }
View Full Code Here

    clone.clip(drawAreaBounds);
    clone.translate(x, y);
    if (shouldFill)
    {
      configureFillColor(layoutContext, clone);
      clone.fill(scaledShape);
    }
    if (shouldDraw)
    {
      configureGraphics(layoutContext, clone);
      clone.draw(scaledShape);
View Full Code Here

                else if (i < rating && rating < 2)
                    g2d.setColor(terrible);
                else
                    g2d.setColor(blank);
               
                g2d.fill(shape);
                g2d.draw(shape);
            }
            bi.flush();
            ratings.put(Long.valueOf(rating), new ImageIcon(bi));
        }
View Full Code Here

    float arcw = 20;
    float arch = 20;
    RoundRectangle2D rectangle = new RoundRectangle2D.Float(x, y, w, h, arcw, arch);
   
    g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);   
    g2d.fill(rectangle);
   
    g2d.setColor(getShadowColor());
    if (orientation == SwingConstants.HORIZONTAL) {
      rectangle.setFrame(x, y, w-1, h-1);
    }
View Full Code Here

                raPath = new Rectangle(1, 1);
            cueLineRect.setRect(0, raPath.y + (int) raPath.getHeight(),
                    getWidth(), 2);

            g2.setColor(cueLineColor);
            g2.fill(cueLineRect);

            // And include the cue line in the area to be rubbed out next time
            ghostImageRect = ghostImageRect.createUnion(cueLineRect);

        }
View Full Code Here

        Insets insets = getInsets();
        Rectangle rect = new Rectangle(insets.left, insets.top, w
                - (insets.left + insets.right), h
                - (insets.top + insets.bottom));
        g.setPaint(new ShapePaint(pattern, getForeground(), getBackground()));
        g.fill(rect);

    }
}
View Full Code Here

        Insets insets = getInsets();
        Rectangle rect = new Rectangle(insets.left, insets.top, w
                - (insets.left + insets.right), h
                - (insets.top + insets.bottom));
        g.setPaint(paint);
        g.fill(rect);
    }

    public Component getListCellRendererComponent(JList list, Object value,
            int index, boolean isSelected, boolean hasFocus) {
        Border border = isSelected ? selectBorder : normalBorder;
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.