Examples of Rectangle


Examples of org.jemmy.Rectangle

     * @param local
     * @return
     * @see #toLocal(org.jemmy.Point)
     */
    public Point toAbsolute(Point local) {
        Rectangle bounds = getScreenBounds();
        return local.translate(bounds.x, bounds.y);
    }
View Full Code Here

Examples of org.mongodb.morphia.testmodel.Rectangle

        final DBCollection rectangles = getDb().getCollection("rectangles");

        assertTrue("'ne' field should not be persisted!", !getMorphia().getMapper().getMCMap().get(ContainsRef.class.getName())
                                                               .containsJavaFieldName("ne"));

        final Rectangle r = new Rectangle(1, 1);
        final DBObject rDbObject = getMorphia().toDBObject(r);
        rDbObject.put("_ns", rectangles.getName());
        rectangles.save(rDbObject);

        final ContainsRef cRef = new ContainsRef();
View Full Code Here

Examples of org.newdawn.fizzy.Rectangle

    world.addBodyListener(item[0].getBody(), this);
    world.addBodyListener(item[1].getBody(), this);
   
    Body currentBeaverBody = currentPlayer.getCurrentBeaver().getBody();
    crosshairAngle = 45;
    crosshair = new StaticBody(new Rectangle(50f,5f),currentBeaverBody.getX(),currentBeaverBody.getY());
    world.add(crosshair);
    crosshair.setRotation(crosshairAngle);
    crosshairImage = new Image("data/crosshair.png").getScaledCopy(0.5f);
    bulletImage = new Image("data/wood.png").getScaledCopy(0.5f);
    healthImage = new Image("data/health.png").getScaledCopy(0.5f);
View Full Code Here

Examples of org.newdawn.slick.geom.Rectangle

    if (sameColor(topLeft, topRight)) {
      gradient = new GradientFill(x, y, convertToSlickColor(topLeft), x, y + height, convertToSlickColor(bottomLeft));
    } else {
      gradient = new GradientFill(x, y, convertToSlickColor(topLeft), x + width, y, convertToSlickColor(bottomRight));
    }
    Rectangle rect = new Rectangle(x, y, width, height);
    gameContainer.getGraphics().fill(rect, gradient);
  }
View Full Code Here

Examples of org.nlogo.shape.Rectangle

    if (!editorDialog.editingElements()) {
      if (editorDialog.getElementType() == Line.class) {
        return new Line
            (start, last, editorDialog.getElementColor());
      } else if (editorDialog.getElementType() == Rectangle.class) {
        return new Rectangle
            (start, last, editorDialog.getElementColor());
      } else if (editorDialog.getElementType() == Circle.class) {
        return new Circle
            (start, last, editorDialog.getElementColor());
      }
View Full Code Here

Examples of org.openpnp.model.Rectangle

    // the VisionProvider
    Thread.sleep(500);
   
    VisionProvider visionProvider = camera.getVisionProvider();
   
    Rectangle aoi = vision.getAreaOfInterest();
   
    // Perform the template match
    logger.debug("Perform template match.");
    Point[] matchingPoints = visionProvider.locateTemplateMatches(
        aoi.getX(),
        aoi.getY(),
        aoi.getWidth(),
        aoi.getHeight(),
        0,
        0,
        vision.getTemplateImage());
   
    // Get the best match from the array
View Full Code Here

Examples of org.ow2.easybeans.tests.common.ejbs.entity.geometricforms.Rectangle

    /**
     * Creates and modifies a rectangle.
     */
    @Override
    protected void createAndModifyEntity() {
        Rectangle rectangle = new Rectangle();
        rectangle.setSide1(1);
        rectangle.setFormType(FormType.RECTANGLE);
        entityManager.persist(rectangle);
        entityManager.flush();

        rectangle.setSide1(2);
        entityManager.flush();

    }
View Full Code Here

Examples of org.pdfclown.objects.Rectangle

  {
    super(context);

    PdfDictionary header = getBaseDataObject().getHeader();
    header.put(PdfName.Subtype,PdfName.Form);
    header.put(PdfName.BBox,new Rectangle(0,0,0,0).getBaseDataObject());

    // No resources collection?
    /* NOTE: Resources collection is mandatory. */
    if(resources == null)
    {resources = new Resources(context);}
View Full Code Here

Examples of org.primefaces.model.map.Rectangle

    MapModel model = map.getModel();
   
    writer.write(",rectangles:[");
   
    for(Iterator<Rectangle> rectangles = model.getRectangles().iterator(); rectangles.hasNext();) {
      Rectangle rectangle = (Rectangle) rectangles.next();
     
      writer.write("new google.maps.Rectangle({");
      writer.write("id:'" + rectangle.getId() + "'");
     
            LatLng ne = rectangle.getBounds().getNorthEast();
            LatLng sw = rectangle.getBounds().getSouthWest();
                       
      writer.write(",bounds:new google.maps.LatLngBounds( new google.maps.LatLng(" + ne.getLat() + "," + ne.getLng() +"), new google.maps.LatLng(" + sw.getLat() + "," + sw.getLng() +"))");
     
      writer.write(",strokeOpacity:" + rectangle.getStrokeOpacity());
      writer.write(",strokeWeight:" + rectangle.getStrokeWeight());
      writer.write(",fillOpacity:" + rectangle.getFillOpacity());
     
      if(rectangle.getStrokeColor() != null) writer.write(",strokeColor:'" + rectangle.getStrokeColor() + "'");
      if(rectangle.getFillColor() != null) writer.write(",fillColor:'" + rectangle.getFillColor() + "'");
      if(rectangle.getZindex() > Integer.MIN_VALUE) writer.write(",zIndex:" + rectangle.getZindex());

            writer.write("})");
     
      if(rectangles.hasNext())
        writer.write(",");
View Full Code Here

Examples of org.rascalmpl.library.vis.util.vector.Rectangle

    SWTGraphicsContext swtGC = new SWTGraphicsContext();
    swtGC.setGC(gc);
   
    gc.setBackground(getDisplay().getSystemColor(SWT.COLOR_WHITE));

    figure.draw(new Coordinate(1.0, 1.0), swtGC, new Rectangle(0, 0, figureWidth, figureHeight), new SWTElementsVisibilityManager().getVisibleSWTElementsVector());
 
    ImageLoader il = new ImageLoader();
    il.data = new ImageData[] {image.getImageData()};
    il.save(to, SWT.IMAGE_PNG);
  }
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.