Package java.awt

Examples of java.awt.Graphics2D.drawOval()


        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


         
          //changement de couleur
          g2D.setColor(new Color(255,0,0));
          g2D.setStroke(new BasicStroke(1));
         
          g2D.drawOval(120, 20, 100, 100);
         
         
        }
       
      }
View Full Code Here

         
          //changement de couleur
          g2D.setColor(new Color(255,0,0));
          g2D.setStroke(new BasicStroke(1));
         
          g2D.drawOval(120, 20, 100, 100);
         
         
        }
       
      }
View Full Code Here

    final Object renderingHint = modeController.getController().getMapViewManager().setEdgesRenderingHint(g);
    paintBackgound(g);
    paintDragOver(g);
    g.setColor(Color.gray);
    g.setStroke(new BasicStroke(1.0f));
    g.drawOval(0, 0, getWidth() - 1, getHeight() - 1);
    g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, renderingHint);
    super.paintComponent(g);
  }

  @Override
View Full Code Here

                gm.fillOval(-(int) ((float) bounds.width / 4f), (int) ((float) bounds.height / 4f), bounds.width, bounds.height);
                gm.setComposite(cpsm);
                gm.setColor(Color.BLACK);
                Insets in = getInsets();
                if (style == PaintStyle.STYLE_GLOW) {
                        gm.drawOval(in.left, in.top, bounds.width - in.right, bounds.height - in.bottom);
                }
                gm.dispose();
                mask.runValidate();
                if (style == PaintStyle.STYLE_GLOW) {
                        mask.draw(this, g, GLFX.gfx.FX_DOWNREFLEXION_EXT, new Point(0, 0), ledColor);
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

      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

      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

        g2.setPaint(this.isEnabled()
            ? new GradientPaint(-1200, -1200, Color.CYAN, 1200, 1200, Color.BLUE)
            : new GradientPaint(-1200, -1200, Color.LIGHT_GRAY, 1200, 1200, Color.GRAY));
        g2.fillOval(-900, -900, 1800, 1800);
        g2.setColor(Color.BLACK);
        g2.drawOval(-1000, -1000, 2000, 2000);      
       
        // Pinto las marcas pequenas, los minutos
        for (int i = 0; i < 60; i++) {
            g2.setColor(Color.WHITE);
            g2.fillRect(900, -5 , 50, 10);
View Full Code Here

                    g2.setTransform(mytrans);      
                    g2.setColor(Color.YELLOW);
                    g2.fillOval(-25, -25, 50, 50);
                    g2.setColor(Color.DARK_GRAY);
                    g2.drawOval(-25, -25, 50, 50);
                }
            }
        }
       
        // Pinto el tornillo central
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.