Examples of drawArc()


Examples of java.awt.Graphics2D.drawArc()

        g.fillArc(circ_x, circ_y, circ_w, circ_w, curr_angle, 360 - curr_angle);
        drawLegendLine(g, 5, height - 5 - 15 * i, fillRest.getPieceName()+" ("+fillRest.getFractionPercent()+" %)", fillRest.getColor());

        //draw border around the circle
        g.setColor(Color.decode("0x"+COL_BORDER));
        g.drawArc(circ_x, circ_y, circ_w, circ_w, 0, 360);

        peerloadPictureDate = System.currentTimeMillis();
    }

    private static void drawLegendLine(final Graphics2D g, final int x, final int y, final String caption, final Color item_color) {
View Full Code Here

Examples of java.awt.Graphics2D.drawArc()

            g.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
            g.setFont(font.deriveFont(Font.BOLD, getIconWidth()*3/4));
            g.setColor(Color.green.darker());
            final int SW = Math.max(getIconWidth()/10, 4);
            g.setStroke(new BasicStroke(SW));
            g.drawArc(SW/2, SW/2, getIconWidth()-SW-1, getIconHeight()-SW-1, 0, 360);
            Rectangle2D bounds =
                font.getStringBounds("i", g.getFontRenderContext());
            g.drawString("i", Math.round((getIconWidth() - bounds.getWidth())/2 - getIconWidth()/12),
                         SW/2 + Math.round((getIconHeight()-bounds.getHeight())/2 - bounds.getY() + getIconHeight()/8));
            g.dispose();
View Full Code Here

Examples of java.awt.Graphics2D.drawArc()

        for (int i = 0; i < 2; i++) {
            setStroke(g, i);
            g.drawLine(0, SIZE / 2, SIZE, SIZE / 2);
            g.drawLine(SIZE / 2, SIZE, SIZE / 2, SIZE * LINE_REPEAT);
            // g.drawLine(0, SIZE / 2, SIZE / 2, SIZE);
            g.drawArc(-SIZE / 2, SIZE / 2, SIZE, SIZE, 0, 90);
        }
        g.dispose();
        savePng(img, "div-ts.png");
        savePng(flipHorizontal(img), "div-te.png");
        img = new BufferedImage(SIZE, SIZE * LINE_REPEAT, BufferedImage.TYPE_INT_ARGB);
View Full Code Here

Examples of java.awt.Graphics2D.drawArc()

        savePng(flipHorizontal(img), "div-te.png");
        img = new BufferedImage(SIZE, SIZE * LINE_REPEAT, BufferedImage.TYPE_INT_ARGB);
        g = img.createGraphics();
        for (int i = 0; i < 2; i++) {
            setStroke(g, i);
            g.drawArc(SIZE / 2, -SIZE / 2, SIZE, SIZE, 180, 270);
            // g.drawLine(SIZE / 2, 0, SIZE, SIZE / 2);
        }
        savePng(img, "div-ls.png");
        savePng(flipHorizontal(img), "div-le.png");
        for (int i = 0; i < 2; i++) {
View Full Code Here

Examples of java.awt.Graphics2D.drawArc()

        }
        savePng(img, "div-ls.png");
        savePng(flipHorizontal(img), "div-le.png");
        for (int i = 0; i < 2; i++) {
            setStroke(g, i);
            g.drawArc(SIZE / 2, -SIZE / 2, SIZE, SIZE, 180, 270);
            g.drawLine(SIZE / 2, 0, SIZE / 2, SIZE * LINE_REPEAT);
        }
        g.dispose();
        savePng(img, "div-ks.png");
        savePng(flipHorizontal(img), "div-ke.png");
View Full Code Here

Examples of java.awt.Graphics2D.drawArc()

    g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
        RenderingHints.VALUE_ANTIALIAS_ON);

    g2.setColor(this.getTowerColor());

    g2.drawArc(2, 2, 16, 16, 1, 360);

    g2.drawArc(5, 5, 10, 10, 1, 360);

    g2.drawArc(8, 8, 4, 4, 1, 360);
View Full Code Here

Examples of java.awt.Graphics2D.drawArc()

    g2.setColor(this.getTowerColor());

    g2.drawArc(2, 2, 16, 16, 1, 360);

    g2.drawArc(5, 5, 10, 10, 1, 360);

    g2.drawArc(8, 8, 4, 4, 1, 360);

    // g2.drawLine(10, 2, 10, 18);
    // g2.drawLine(2, 10, 18, 10);
View Full Code Here

Examples of java.awt.Graphics2D.drawArc()

    g2.drawArc(2, 2, 16, 16, 1, 360);

    g2.drawArc(5, 5, 10, 10, 1, 360);

    g2.drawArc(8, 8, 4, 4, 1, 360);

    // g2.drawLine(10, 2, 10, 18);
    // g2.drawLine(2, 10, 18, 10);

    g2.dispose();
View Full Code Here

Examples of java.awt.Graphics2D.drawArc()

    Graphics2D g2 = (Graphics2D) getImage().getGraphics();
    g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
        RenderingHints.VALUE_ANTIALIAS_ON);
    g2.setColor(this.getTowerColor());

    g2.drawArc(8, 2, 5, 16, 1, 360);

    g2.drawArc(2, 8, 16, 5, 1, 360);

    g2.drawArc(8, 8, 4, 4, 1, 360);
View Full Code Here

Examples of java.awt.Graphics2D.drawArc()

        RenderingHints.VALUE_ANTIALIAS_ON);
    g2.setColor(this.getTowerColor());

    g2.drawArc(8, 2, 5, 16, 1, 360);

    g2.drawArc(2, 8, 16, 5, 1, 360);

    g2.drawArc(8, 8, 4, 4, 1, 360);

    g2.dispose();
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.