Package java.awt

Examples of java.awt.Graphics2D.drawOval()


      if(teamID == 1) kleur = Color.LIGHT_GRAY;
      else kleur = Color.DARK_GRAY;
      //dit vakje is bezet
      Graphics2D g2 = (Graphics2D)g.create();
      g2.setColor(kleur);
      g2.drawOval(upperX, upperY, 25*2, 25*2);
      g2.fillOval(upperX, upperY, 25*2, 25*2);
    }
  }
}
 
View Full Code Here


        g2.drawLine(blockX, blockY - blockHeight, penX, penY);
        g2.setColor(Color.BLACK);
        int pivotRad = 4;

        // little circle at the pivot
        g2.drawOval(blockX - pivotRad, blockY - pivotRad - blockHeight,
                2 * pivotRad, 2 * pivotRad);

        // draw the force acting on block

        if (isHumanActive()) {
View Full Code Here

    }

    if (mode == MODE_FLAT)
    {
      g2.drawLine(modx2 - modWidth / 3, mody1 - modHeight, modx2 - modWidth / 3, mody2);
      g2.drawOval(modx2 - modWidth / 3, mody1 + modHeight / 4, modWidth / 3, modHeight / 2);
    }

    if (duration == 1)
    {
      g2.drawOval(x1, y1, width, height);
View Full Code Here

      g2.drawOval(modx2 - modWidth / 3, mody1 + modHeight / 4, modWidth / 3, modHeight / 2);
    }

    if (duration == 1)
    {
      g2.drawOval(x1, y1, width, height);
      tailTip = null;
    }
    else
    {
      if (tailTip == null)
View Full Code Here

      else
        tailTip.setLocation(x2, y1 + height / 2 - Constants.NOTATION_TAIL_LENGTH);
     
      if (duration == 2)
      {
        g2.drawOval(x1, y1, width, height);
        g2.drawLine(x2, y1 + height / 2, x2, y1 + height / 2 - Constants.NOTATION_TAIL_LENGTH);
      }
      else
      {
        g2.fillOval(x1, y1, width, height);
View Full Code Here

      //  g2.drawLine(blockX, blockY - blockHeight, penX, penY);
        g2.setColor(Color.BLACK);
        int pivotRad = 4;

        // little circle at the pivot
        g2.drawOval(blockX - pivotRad, blockY - pivotRad - blockHeight,
                2 * pivotRad, 2 * pivotRad);

        // draw the force acting on block

        if (isHumanActive()) {
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.setColor( pumps.get(i).getColor() )// color is accessible by pumps and handled by states
        g2.fillOval( -pumpSize/2, -PANEL_SIZE/2, pumpSize, pumpSize );
        // Outline the pump so it looks pretty.
        g2.setStroke( stroke2 );
        g2.setColor( Color.BLACK );
        g2.drawOval( -pumpSize/2, -PANEL_SIZE/2, pumpSize, pumpSize );
        // Show the pump ID number, mostly for debugging purposes.
        g2.setColor( Color.WHITE );
        g2.drawString( "" + i, -font.getSize()/4, -PANEL_SIZE/2 + pumpSize/2 + font.getSize()/3 );

        // Rotate the graphics object to draw the next pump.
View Full Code Here

                    }
                } else if (mode == Mode.translate || mode == Mode.translate_node) {
                    g2.setColor(mainColor);
                    if (p1.distance(p2) < 3) {
                        g2.setStroke(mainStroke);
                        g2.drawOval((int)(p1.x-symbolSize/2), (int)(p1.y-symbolSize/2),
                                (int)(symbolSize), (int)(symbolSize));
                    } else {
                        Line2D oldline = new Line2D.Double(p1, p2);
                        g2.setStroke(oldLineStroke);
                        g2.draw(oldline);
View Full Code Here

    saveState(g);
    transformGraphics(g, center);
    g.setStroke(stroke);
    g.scale(radius, radius);
    g.setColor(s);
    g.drawOval(-1, -1, 2, 2);
    restoreState(g);
  }
 
  @Override
  public void drawCircle(Vec2 center, float radius, Vec2 axis, 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.