Examples of Ellipse2D


Examples of java.awt.geom.Ellipse2D

  /**
   * @see Graphics#fillOval(int, int, int, int)
   */
  public void fillOval(final int x, final int y, final int width, final int height)
  {
    final Ellipse2D oval = new Ellipse2D.Float((float) x, (float) y, (float) width, (float) height);
    fill(oval);
  }
View Full Code Here

Examples of java.awt.geom.Ellipse2D

      circleSize = maxSize * (z / maxZ);

      circleSize = Math.abs(circleSize);

      Ellipse2D circle = null;
      if (orientation == PlotOrientation.VERTICAL)
      {
        circle = new Ellipse2D.Double(transX - circleSize / 2.0, transY - circleSize / 2.0, circleSize, circleSize);
      }
      else if (orientation == PlotOrientation.HORIZONTAL)
View Full Code Here

Examples of java.awt.geom.Ellipse2D

  public void replay(final WmfFile file)
  {
    final Graphics2D graph = file.getGraphics2D();
    final Rectangle rec = getScaledBounds();

    final Ellipse2D ellipse = new Ellipse2D.Double();
    ellipse.setFrame(rec.x, rec.y, rec.width, rec.height);

    final MfDcState state = file.getCurrentState();

    if (state.getLogBrush().isVisible())
    {
View Full Code Here

Examples of java.awt.geom.Ellipse2D

    g.drawImage(ERROR_CATCH_IMAGE, x + 3, y + 3, width - 6, height - 6, null);
  }

  public void drawCatchingEvent(int x, int y, int width, int height, Image image) {
    // event circles
    Ellipse2D outerCircle = new Ellipse2D.Double(x, y, width, height);
    int innerCircleX = x + 3;
    int innerCircleY = y + 3;
    int innerCircleWidth = width - 6;
    int innerCircleHeight = height - 6;
    Ellipse2D innerCircle = new Ellipse2D.Double(innerCircleX, innerCircleY, innerCircleWidth, innerCircleHeight);

    Paint originalPaint = g.getPaint();
    g.setPaint(BOUNDARY_EVENT_COLOR);
    g.fill(outerCircle);
View Full Code Here

Examples of java.awt.geom.Ellipse2D

                    (int)rect.getWidth(), (int)rect.getHeight() );
            return;
        }
       
        if( shape instanceof Ellipse2D){
            Ellipse2D ellipse=(Ellipse2D) shape;
            graphics.drawOval((int)ellipse.getMinX(), (int)ellipse.getMinY(),
                    (int)ellipse.getWidth(), (int)ellipse.getHeight());
            return;
        }
       
        if( graphics instanceof SWTGraphics ){
          if( path==null || path.isDisposed() )
View Full Code Here

Examples of java.awt.geom.Ellipse2D

   
            // for each location, create a circle and draw
            for (Coordinate location : coordinates) {
                Coordinate world = JTS.transform(location,  null, dataToWorldTransform);
                Point pixel = context.worldToPixel(world);
                Ellipse2D e = new Ellipse2D.Double(pixel.x - 4, pixel.y - 4, 10, 10);
                g.draw(e);
            }
        }
        catch (FactoryException unableToTransform){
            context.getLayer().setStatusMessage(unableToTransform.getMessage());
View Full Code Here

Examples of java.awt.geom.Ellipse2D

         return; //no coordinates to draw
     }
        
     //for each coordnate, create a circle and draw
     for (Coordinate coordinate : coordinates) {
        Ellipse2D e = new Ellipse2D.Double(
                coordinate.x-4,
                coordinate.y-4,
                10,10);
        g.draw(e);
     }
View Full Code Here

Examples of java.awt.geom.Ellipse2D

   *
   * @param harness  the test harness (<code>null</code> not permitted).
   */
  public void test(TestHarness harness)      
  {
    Ellipse2D e = new Ellipse2D.Float();
    harness.check(e.getWidth(), 0.0);

    e = new Ellipse2D.Float(1.0f, 2.0f, 3.0f, 4.0f);
    harness.check(e.getWidth(), 3.0);
  }
View Full Code Here

Examples of java.awt.geom.Ellipse2D

   *
   * @param harness  the test harness (<code>null</code> not permitted).
   */
  public void test(TestHarness harness)      
  {
    Ellipse2D e = new Ellipse2D.Double();
    Rectangle2D b = e.getBounds2D();
    harness.check(b.getX(), 0.0);
    harness.check(b.getY(), 0.0);
    harness.check(b.getWidth(), 0.0);
    harness.check(b.getHeight(), 0.0);

    e = new Ellipse2D.Double(1.0, 2.0, 3.0, 4.0);
    b = e.getBounds2D();
    harness.check(b.getX(), 1.0);
    harness.check(b.getY(), 2.0);
    harness.check(b.getWidth(), 3.0);
    harness.check(b.getHeight(), 4.0);
  }
View Full Code Here

Examples of java.awt.geom.Ellipse2D

   *
   * @param harness  the test harness (<code>null</code> not permitted).
   */
  public void test(TestHarness harness)
  {
    Ellipse2D e1 = new Ellipse2D.Float(1.0f, 2.0f, 3.0f, 4.0f);
    Ellipse2D e2 = null;
    e2 = (Ellipse2D) e1.clone();
    harness.check(e1.getX(), e2.getX());
    harness.check(e1.getY(), e2.getY());
    harness.check(e1.getWidth(), e2.getWidth());
    harness.check(e1.getHeight(), e2.getHeight());
    harness.check(e1.getClass(), e2.getClass());
    harness.check(e1 != e2);
  }
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.