Package java.awt

Examples of java.awt.Graphics.fillPolygon()


            toolIcon.paintIcon(c.getDestination(), g, x + 2, y + 2);
        } else {
            int[] xp = { x+ 5, x+ 5, x+ 9, x+12, x+14, x+11, x+16 };
            int[] yp = { y   , y+17, y+12, y+18, y+18, y+12, y+12 };
            g.setColor(java.awt.Color.black);
            g.fillPolygon(xp, yp, xp.length);
        }
    }

    @Override
    public Cursor getCursor() {
View Full Code Here


                hexaY[4] = hexaY[5] = y+size;

                if (rCArray != null) {
                    g.setColor(rCArray[ci++ & NUM_RANDOMCOLORMASK]);
                }
                g.fillPolygon(hexaX, hexaY, 6);
                if ((x -= 3) < 0) x += rctx.maxX;
                if ((y -= 1) < 0) y += rctx.maxY;
            } while (--numReps > 0);
            rctx.colorindex = ci;
            g.translate(-rctx.orgX, -rctx.orgY);
View Full Code Here

    g.drawRect(0, 0, 100, 200);
    g.setColor(Color.RED);
    g.fillRect(150, 50, 50, 30);
    g.drawRect(150, 50, 300, 60);
    g.setColor(Color.CYAN);
    g.fillPolygon(new int[] { 200, 210, 250, 270 }, new int[] { 100, 150, 160, 110 }, 4);
    g.setColor(Color.ORANGE);
    g.translate(250, 250);
    g.drawArc(-50, -50, 100, 100, 0, 360);
    TestDraw.assertEquals(i, j);
  }
View Full Code Here

        Graphics g = retVal.getGraphics();
        g.setColor(progressbarBackgroundColor);
        g.fillRect(0, 0, frameSize.width, frameSize.height * 2);
        g.setColor(progressbarSpiralColor);
        for (int k : new int[] { -24, 0, 24, 48, 72 }) {
            g.fillPolygon(new int[] { 0, 24, 24, 0 }, new int[] { 24 + k, k, 12 + k, 36 + k }, 4);
        }
        g.dispose();

        return retVal;
    }
View Full Code Here

        try {
            g.setColor(progressbarBackgroundColor);
            g.fillRect(0, 0, dimension.width, dimension.height * 2);
            g.setColor(progressbarSpiralColor);
            for (int k : new int[] { -24, 0, 24, 48, 72 }) {
                g.fillPolygon(new int[] { 0, 24, 24, 0 }, new int[] { 24 + k, k, 12 + k, 36 + k }, 4);
            }
        } finally {
            if (g != null) {
                g.dispose();
            }
View Full Code Here

        try {
            g.setColor(progressbarBackgroundColor);
            g.fillRect(0, 0, dimension.width, dimension.height * 2);
            g.setColor(progressbarSpiralColor);
            for (int k : new int[] { -24, 0, 24, 48, 72 }) {
                g.fillPolygon(new int[] { 0, 24, 24, 0 }, new int[] { 24 + k, k, 12 + k, 36 + k }, 4);
            }
        } finally {
            if (g != null) {
                g.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.