Package java.awt

Examples of java.awt.Graphics2D.drawOval()


    g.setColor(p.getRealColor());
    g.fillOval(20, 20, 8, 8);

    g.setColor(Color.BLACK);
    g.drawOval(20, 20, 8, 8);

    g.dispose();

    return new ImageIcon(img);
  }
View Full Code Here


      int x = randomInt(0, width / 2);
      int y = randomInt(0, height / 2);

      gfx.setXORMode(Color.BLACK);
      gfx.setStroke(new BasicStroke(randomInt(fontSize / 8, fontSize / 2)));
      gfx.drawOval(x, y, dx, dy);

      WritableRaster rstr = image.getRaster();
      int[] vColor = new int[3];
      int[] oldColor = new int[3];
      Random vRandom = new Random(System.currentTimeMillis());
View Full Code Here

      Vector2D middle = this.getPositionInVisualization(0);
      double radius = DomPhysAgent.MAX_ORBIT_ABSTAND + DomPhysMond.RADIUS;
      double imgAbstand = radius * this.globalScale();
      Graphics2D g = img.createGraphics();
      g.setColor(Color.red);
      g.drawOval(
              (int) (middle.x - imgAbstand),
              (int) (middle.y - imgAbstand),
              (int) (imgAbstand * 2),
              (int) (imgAbstand * 2));
     
View Full Code Here

    g.setPaint(gp);
    g.fillOval(position.x+2, position.y, this.dimension.height,
        this.dimension.height);
    g.setColor(Color.black);
        g.setStroke(new BasicStroke(1.2f));
        g.drawOval(position.x+2, position.y, this.dimension.height,
        this.dimension.height );
    // Text
    g.setColor(TEXT_COLOR);

    // XXX it's debatable if we should show the ID or the name.
View Full Code Here

                            (int) (kreis.holeRadius() * 2),
                            (int) (kreis.holeRadius() * 2));
                }
                if (rahmenDrucken) {
                    g2.setColor(rahmenFarbe);
                    g2.drawOval(
                            (int) (kreis.holeMitte().x - kreis.holeRadius()),
                            (int) (kreis.holeMitte().y - kreis.holeRadius()),
                            (int) (kreis.holeRadius() * 2),
                            (int) (kreis.holeRadius() * 2));
                }
View Full Code Here

                            (int) (kreis.getRadius() * 2),
                            (int) (kreis.getRadius() * 2));
                }
                if (rahmenDrucken) {
                    g2.setColor(rahmenFarbe);
                    g2.drawOval(
                            (int) (kreis.getCenter().x - kreis.getRadius()),
                            (int) (kreis.getCenter().y - kreis.getRadius()),
                            (int) (kreis.getRadius() * 2),
                            (int) (kreis.getRadius() * 2));
                }
View Full Code Here

                            (int) (kreis.holeRadius() * 2),
                            (int) (kreis.holeRadius() * 2));
                }
                if (rahmenDrucken) {
                    g2.setColor(rahmenFarbe);
                    g2.drawOval(
                            (int) (kreis.holeMitte().x - kreis.holeRadius()),
                            (int) (kreis.holeMitte().y - kreis.holeRadius()),
                            (int) (kreis.holeRadius() * 2),
                            (int) (kreis.holeRadius() * 2));
                }
View Full Code Here

            g.setColor(Color.RED);
            g.setStroke(new BasicStroke(
                    2,
                    BasicStroke.CAP_ROUND,
                    BasicStroke.JOIN_ROUND));
            g.drawOval(
                    (int) bester.getPosition().x - radius / 2,
                    (int) bester.getPosition().y - radius / 2,
                    radius,
                    radius);
        } else if (this.pars.getAutomatInGIFModus().startsWith(
View Full Code Here

            g.setColor(Color.RED);
            g.setStroke(new BasicStroke(
                    2,
                    BasicStroke.CAP_ROUND,
                    BasicStroke.JOIN_ROUND));
            g.drawOval(
                    (int) this.getAkteure().get(num).getPosition().x
                        - radius / 2,
                    (int) this.getAkteure().get(num).getPosition().y
                        - radius / 2,
                    radius,
View Full Code Here

            g.setColor(Color.red);
        }
       
        g.fillOval(img.getWidth() - 25, 50, 20, 20);
        g.setColor(Color.black);
        g.drawOval(img.getWidth() - 25, 50, 20, 20);
       
        return img;
    }

    @Override
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.