Package java.awt

Examples of java.awt.Graphics2D.fillPolygon()


      yInts[i] = (int) temp.y;
    }

    Color c = cpool.getColor(color.x, color.y, color.z, .4f);
    g.setColor(c);
    g.fillPolygon(xInts, yInts, vertexCount);

    // outside
    drawPolygon(vertices, vertexCount, color);
  }
View Full Code Here


        } else {
            p.addPoint(4, 0);
            p.addPoint(8, 4);
            p.addPoint(4, 8);
        }
        g.fillPolygon(p);
        g.dispose();
        return image;
    }

    public void addActionListener(DatePanelEvent action) {
View Full Code Here

   * Paint the icon
   */
  public void paintIcon(Component c, Graphics g, int x, int y) {
    Graphics2D g2 = (Graphics2Dg;
    g2.setColor(Color.BLACK);
    g2.fillPolygon(new int[]{x,x+10,x}, new int[]{y,y+5,y+10}, 3);
  }

}
View Full Code Here

                    wcopy.xpoints[index] = (int) (r.xpoints[index] * scale + tx);
                    wcopy.ypoints[index] = (int) (r.ypoints[index] * scale + ty);
                }
                g2.drawPolygon(wcopy);
                g2.setColor(riverborder);
                g2.fillPolygon(wcopy);
            }

            Graphics2D g3 = (Graphics2D) g;

            /** LINE2D -> (I) WATERWAYS */
 
View Full Code Here

         
        } else {
          elem.setOn(true);
          g.setColor(selectionColor);
          elem.setColor(selectionColor);
          g.fillPolygon(scaled);
          if (selEnter) {
            elem.setEnter(true);
            elem.setExit(false);
          }
          if (selExit) {
View Full Code Here

        for (int i = 0; i < polygonList.size(); i++) {
          ClickPolygon elem = polygonList.get(i);
          ClickPolygon scaled = scaledPolygonList.get(i);
          if (elem.isOn()) {
            g2.setColor(elem.getColor());
            g2.fillPolygon(scaled);
          } else {
            g2.setColor(internColor);
            g2.fillPolygon(scaled);
          }
        }
View Full Code Here

          if (elem.isOn()) {
            g2.setColor(elem.getColor());
            g2.fillPolygon(scaled);
          } else {
            g2.setColor(internColor);
            g2.fillPolygon(scaled);
          }
        }
        break;

      default:
View Full Code Here

      // g.setComposite(AlphaComposite.getInstance(type, alpha));
      if (scaled.contains(new Point(e.getX(), e.getY()))) {
        if (elem.isOn()) {
          elem.setOn(false);
          g.setColor(internColor);
          g.fillPolygon(scaled);
         
          elem.setEnter(false);
          elem.setExit(false);
         
        } else {
View Full Code Here

                g2.setColor(Color.DARK_GRAY);
                g2.drawArc(-1000, -1000, 2000, 2000, 90 - iArc, iArc);
            } else {
                // la aguja de las horas
                g2.setColor(Color.WHITE);
                g2.fillPolygon(new int[]{0, -35, 0, 35}, new int[]{100, 0, -600, 0}, 4);  
                g2.setColor(Color.DARK_GRAY);
                g2.drawPolygon(new int[]{0, -35, 0, 35}, new int[]{100, 0, -600, 0}, 4);

                // Aguja de los minutos
                g2.setTransform(mytrans);      
View Full Code Here

                // Aguja de los minutos
                g2.setTransform(mytrans);      
                g2.transform(AffineTransform.getRotateInstance((dminute) * Math.PI / 30.0)); // Poner minutos
                g2.setColor(Color.WHITE);
                g2.fillPolygon(new int[]{0, -35, 0, 35}, new int[]{100, 0, -900, 0}, 4);  
                g2.setColor(Color.DARK_GRAY);
                g2.drawPolygon(new int[]{0, -35, 0, 35}, new int[]{100, 0, -900, 0}, 4);     
       
                // Aguja de los segundos
                if (m_bSeconds) {
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.