Package java.awt

Examples of java.awt.Graphics.drawPolygon()


            g.setColor(color);
            g.fillRect(x, y, w - DEPTH, h - DEPTH);
            g.setColor(Color.BLACK);
            g.drawRect(x, y, w - DEPTH, h - DEPTH);
            g.drawLine(x + w - DEPTH, y + h - DEPTH, x + w, y + h);
            g.drawPolygon(xp, yp, xp.length);
        }

        g.translate(depress, depress);
        g.setColor(painter.getAttributeValue(Io.ATTR_LABEL_COLOR));
        painter.drawLabel();
View Full Code Here


                xp = new int[] { xb, x1, x1, xb, xb, x0, xb  };
                yp = new int[] { y0, y0, y1, y1, mw, 0,  -mw };
            }
        }
        GraphicsUtil.switchToWidth(g, 2);
        g.drawPolygon(xp, yp, xp.length);
    }

    @Override
    public void paintInstance(InstancePainter painter) {
        Location loc = painter.getLocation();
View Full Code Here

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

                if (rCArray != null) {
                    g.setColor(rCArray[ci++ & NUM_RANDOMCOLORMASK]);
                }
                g.drawPolygon(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

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.