Package java.awt

Examples of java.awt.Graphics.drawPolyline()


        if (toolIcon != null) {
            toolIcon.paintIcon(painter.getDestination(), g, 2, 2);
        } else {
            g.drawRect(4, 4, 13, 13);
            g.setColor(Value.FALSE.getColor());
            g.drawPolyline(new int[] { 6, 6, 10, 10, 14, 14 },
                    new int[] { 10, 6, 6, 14, 14, 10 }, 6);
        }

        Direction dir = painter.getAttributeValue(StdAttr.FACING);
        int pinx = 15; int piny = 8;
View Full Code Here


    int[] yPoints=new int[3];
    for(int j=0;j<3;j++){
      xPoints[j]=random.nextInt(width - 1);
      yPoints[j]=random.nextInt(height - 1);
    }
    g.drawPolyline(xPoints, yPoints,3);
    g.setFont(mFont);   
    String sRand="";
    int itmp=0;
    for(int i=0;i<4;i++){
      if(random.nextInt(2)==1){
View Full Code Here

                g2.dispose();
            }
            if (paintPoly != null) {
                Graphics g2 = g.create();
                g2.setColor(Utils.complement(PaintColors.getBackgroundColor()));
                g2.drawPolyline(paintPoly.xpoints, paintPoly.ypoints, paintPoly.npoints);
                g2.dispose();
            }
        }
        super.paint(g);
    }
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.