Package java.awt

Examples of java.awt.Graphics2D.drawOval()


    g2.setStroke(new BasicStroke(1f));
   
   

   
    g2.drawOval(11, 10, 2, 2);
    g2.drawOval(7, 13, 2, 2);
    g2.drawOval(7, 7, 2, 2);
   
    g2.dispose();
   
View Full Code Here


   
   

   
    g2.drawOval(11, 10, 2, 2);
    g2.drawOval(7, 13, 2, 2);
    g2.drawOval(7, 7, 2, 2);
   
    g2.dispose();
   
  }
View Full Code Here

   

   
    g2.drawOval(11, 10, 2, 2);
    g2.drawOval(7, 13, 2, 2);
    g2.drawOval(7, 7, 2, 2);
   
    g2.dispose();
   
  }
 
View Full Code Here

            g.setColor(circleColor);
            for (int i = 0; i < circlesToDraw; i++) {
                int circleRadius = (int) (Math.random() * height / 2.0);
                int circleX = (int) (Math.random() * width - circleRadius);
                int circleY = (int) (Math.random() * height - circleRadius);
                g.drawOval(circleX, circleY, circleRadius * 2, circleRadius * 2);
            }
            g.setColor(textColor);
            g.setFont(textFont);

            FontMetrics fontMetrics = g.getFontMetrics();
View Full Code Here

        gfx.setColor(Color.BLACK);
        gfx.setBackground(Color.WHITE);
        gfx.clearRect(0, 0, size, size);

        int b = size / 30;
        gfx.drawOval(b, b, size - 1 - 2 * b, size - 1 - 2 * b);

        int esz = size / 7;
        int ex = (int) (0.27f * size);
        gfx.drawOval(ex, ex, esz, esz);
        gfx.drawOval(size - 1 - esz - ex, ex, esz, esz);
View Full Code Here

        int b = size / 30;
        gfx.drawOval(b, b, size - 1 - 2 * b, size - 1 - 2 * b);

        int esz = size / 7;
        int ex = (int) (0.27f * size);
        gfx.drawOval(ex, ex, esz, esz);
        gfx.drawOval(size - 1 - esz - ex, ex, esz, esz);

        b = size / 5;
        gfx.drawArc(b, b, size - 1 - 2 * b, size - 1 - 2 * b, 200, 140);

View Full Code Here

        gfx.drawOval(b, b, size - 1 - 2 * b, size - 1 - 2 * b);

        int esz = size / 7;
        int ex = (int) (0.27f * size);
        gfx.drawOval(ex, ex, esz, esz);
        gfx.drawOval(size - 1 - esz - ex, ex, esz, esz);

        b = size / 5;
        gfx.drawArc(b, b, size - 1 - 2 * b, size - 1 - 2 * b, 200, 140);

        return 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

        gfx.setColor(Color.BLACK);
        gfx.setBackground(Color.WHITE);
        gfx.clearRect(0, 0, size, size);

        int b = size / 30;
        gfx.drawOval(b, b, size - 1 - 2 * b, size - 1 - 2 * b);

        int esz = size / 7;
        int ex = (int) (0.27f * size);
        gfx.drawOval(ex, ex, esz, esz);
        gfx.drawOval(size - 1 - esz - ex, ex, esz, esz);
View Full Code Here

        int b = size / 30;
        gfx.drawOval(b, b, size - 1 - 2 * b, size - 1 - 2 * b);

        int esz = size / 7;
        int ex = (int) (0.27f * size);
        gfx.drawOval(ex, ex, esz, esz);
        gfx.drawOval(size - 1 - esz - ex, ex, esz, esz);

        b = size / 5;
        gfx.drawArc(b, b, size - 1 - 2 * b, size - 1 - 2 * b, 200, 140);

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.