Package java.awt

Examples of java.awt.Graphics2D.drawPolygon()


            } 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);      
                g2.transform(AffineTransform.getRotateInstance((dminute) * Math.PI / 30.0)); // Poner minutos
                g2.setColor(Color.WHITE);
View Full Code Here


                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) {
                    g2.setTransform(mytrans);      
                    g2.transform(AffineTransform.getRotateInstance(dsecond * Math.PI / 30.0)); // Poner segundos
View Full Code Here

                    g2.setTransform(mytrans);      
                    g2.transform(AffineTransform.getRotateInstance(dsecond * Math.PI / 30.0)); // Poner segundos
                    g2.setColor(Color.YELLOW);
                    g2.fillPolygon(new int[]{-15, 0, 15}, new int[]{200, -900, 200}3);  
                    g2.setColor(Color.DARK_GRAY);
                    g2.drawPolygon(new int[]{-15, 0, 15}, new int[]{200, -900, 200}3);  

                    g2.setTransform(mytrans);      
                    g2.setColor(Color.YELLOW);
                    g2.fillOval(-25, -25, 50, 50);
                    g2.setColor(Color.DARK_GRAY);
View Full Code Here

        GraphicsUtil.switchToWidth(g, 1);
        if (!isGhost && painter.shouldDrawColor()) {
            BitWidth width = painter.getAttributeValue(StdAttr.WIDTH);
            g.setColor(Value.repeat(Value.TRUE, width.getWidth()).getColor());
        }
        g.drawPolygon(new int[] { 6, 14, 6 }, new int[] { -8, 0, 8 }, 3);

        g.dispose();
    }
}
View Full Code Here

        int nb = 7;
        gc.setColor(c);
        gc.fillPolygon( xs, ys, nb);
        gc.setColor(f);
        gc.drawPolygon( xs, ys, nb);
        return bi;
    }
    /**
 
View Full Code Here

          g.setColor(colors.get(i));
          g.fillPolygon(xPoints, yPoints, 3);
          g.fillRect(xPoints[1], yPoints[1] + 2, handleWidth + 1, 2);
          g.setColor(Color.black);
        }
        g.drawPolygon(xPoints, yPoints, 3);
      }
      g.translate(-gradientX, -gradientY);
    }
  }
View Full Code Here

          g.setColor(colors.get(i));
          g.fillPolygon(xPoints, yPoints, 3);
          g.fillRect(xPoints[1], yPoints[1] + 2, handleWidth + 1, 2);
          g.setColor(Color.black);
        }
        g.drawPolygon(xPoints, yPoints, 3);
      }
      g.translate(-gradientX, -gradientY);
    }
  }
View Full Code Here

          g.setColor(colors.get(i));
          g.fillPolygon(xPoints, yPoints, 3);
          g.fillRect(xPoints[1], yPoints[1] + 2, handleWidth + 1, 2);
          g.setColor(Color.black);
        }
        g.drawPolygon(xPoints, yPoints, 3);
      }
      g.translate(-gradientX, -gradientY);
    }
  }
View Full Code Here

    }
    g.setStroke(stroke);
    g.setColor(f);
    g.fillPolygon(xInts, yInts, vertexCount);
    g.setColor(s);
    g.drawPolygon(xInts, yInts, vertexCount);
    restoreState(g);
  }

  @Override
  public void drawPolygon(Vec2[] vertices, int vertexCount, Color3f color) {
View Full Code Here

      xInts[i] = (int) temp.x;
      yInts[i] = (int) temp.y;
    }
    g.setStroke(stroke);
    g.setColor(s);
    g.drawPolygon(xInts, yInts, vertexCount);
    restoreState(g);
  }

  @Override
  public void drawString(float x, float y, String s, Color3f color) {
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.