Examples of drawOval()


Examples of java.awt.Graphics.drawOval()

            tempGraphics.drawLine(tempTopX, tempBottomY, tempBottomX, tempBottomY);
           
            // draw the points marking the corners
            tempGraphics.drawOval(tempTopX, tempTopY, 4,4);
            tempGraphics.drawOval(tempTopX, tempBottomY, 4,4);
            tempGraphics.drawOval(tempBottomX, tempTopY, 4,4);
            tempGraphics.drawOval(tempBottomX, tempBottomY, 4,4);
        }
       
        return true;
       
View Full Code Here

Examples of java.awt.Graphics.drawOval()

           
            // draw the points marking the corners
            tempGraphics.drawOval(tempTopX, tempTopY, 4,4);
            tempGraphics.drawOval(tempTopX, tempBottomY, 4,4);
            tempGraphics.drawOval(tempBottomX, tempTopY, 4,4);
            tempGraphics.drawOval(tempBottomX, tempBottomY, 4,4);
        }
       
        return true;
       
    }
View Full Code Here

Examples of java.awt.Graphics.drawOval()

    short s2 = (short) (s / 2);
    SimpleImage img = new SimpleImage(s + 120, s + 120);
    Graphics g = img.getGraphics();
    g.setColor(new Color(255, 0, 0));
    // fillOval gave strange effects at low scales, but drawOval seems to work
    g.drawOval(0, 0, s - 1, s - 1);

    // fill it manually
    for (short i = 0; i < s; i++) {
      nextLine: for (short j = 0; j <= s2; j++) {
        if (img.getRValue(j, i) == 255) {
View Full Code Here

Examples of java.awt.Graphics.drawOval()

        floats[2] = 0;
      }

      final Graphics graphics = g.create();
      graphics.setColor(Color.getHSBColor(floats[0], floats[1], floats[2]));
      graphics.drawOval((int) ((lastPointX * getWidth()) - 2), (int) ((lastPointY * getHeight()) - 2), 4, 4);
      graphics.dispose();
    }
  }

  private float[] computeSelectedPosition()
View Full Code Here

Examples of java.awt.Graphics.drawOval()

      floats[2] = 1 - floats[2];
      floats[1] = 0;

      final Graphics graphics = g.create();
      graphics.setColor(Color.getHSBColor(floats[0], floats[1], floats[2]));
      graphics.drawOval(color.x - 2, color.y - 2, 4, 4);
      graphics.dispose();
    }
  }

  private Point computeSelectedPosition()
View Full Code Here

Examples of java.awt.Graphics2D.drawOval()

          } else {
            // Draw a surrounding oval if no navigation panel icon is defined
            Graphics2D g2D = (Graphics2D)g;
            g2D.setColor(Color.BLACK);
            g2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
            g2D.drawOval(x + 3, y + 3, width - 6, height - 6);
          }
        }
 
        public Insets getBorderInsets(Component c) {
          return new Insets(2, 2, 2, 2);
View Full Code Here

Examples of java.awt.Graphics2D.drawOval()

            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);

            GradientPaint gp = new GradientPaint(180.0f, 280.0f, new Color(255, 255, 255, 255), 250.0f, 380.0f, new Color(255, 255, 0, 0));
            g2.setPaint(gp);
            for(int i = 0; i < 3; i ++ ) {
                g2.drawOval(150, 280, 100, 100);
                g2.fillOval(150, 280, 100, 100);
                g2.translate(120, 20);
            }
        }
    }
View Full Code Here

Examples of java.awt.Graphics2D.drawOval()

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

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

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

Examples of java.awt.Graphics2D.drawOval()

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

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

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

Examples of java.awt.Graphics2D.drawOval()

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