Examples of Rectangle


Examples of org.renjin.graphics.geom.Rectangle

 
  private boolean xLog;
  private boolean yLog;
 
  public UserWindow() {
    setUserCoordinates(new Rectangle(0, 1, 0, 1));
  }
View Full Code Here

Examples of org.rstudio.core.client.Rectangle

      Document doc = win.getDocument();
      NodeList<Element> images = doc.getElementsByTagName("img");
      if (images.getLength() > 0)
      {
         ElementEx img = images.getItem(0).cast();
         return new Rectangle(img.getClientLeft(),
                              img.getClientTop(),
                              img.getClientWidth(),
                              img.getClientHeight());
      }
      else
      {
         return new Rectangle(0,0,0,0);
      }
   }
View Full Code Here

Examples of org.spout.api.math.Rectangle

        popup.setGrabsMouse(false);

        // Setup the window to render
        RenderPartComponent backgroundRect = background.add(RenderPartComponent.class);
        backgroundRect.setRenderMaterial(type.getRenderMaterial());
        backgroundRect.setSprite(new Rectangle(-WIDTH * SCALE, -WIDTH, HEIGHT * 2 * SCALE, HEIGHT * 2));
        backgroundRect.setSource(new Rectangle(0, 0, WIDTH, HEIGHT));
        popup.attachWidget(plugin, background);

        // Draw title
        LabelComponent labelComponent = label.add(LabelComponent.class);
        labelComponent.setFont(VanillaRenderMaterials.FONT);
View Full Code Here

Examples of org.thechiselgroup.choosel.core.client.geometry.Rectangle

    private List<Area> getDropTargetAreas() {
        List<Area> areas = new ArrayList<Area>();
        for (ResourceSetAvatarDropController dropController : getAvailableDropControllers()) {
            Widget dropTarget = dropController.getDropTarget();
            Rectangle rectangle = Rectangle.fromWidget(dropTarget);
            WindowPanel window = getWindow(dropTarget);

            areas.add(new Area(rectangle, window, dropController));
        }
        return areas;
View Full Code Here

Examples of org.vaadin.gwtgraphics.client.shape.Rectangle

   */
  private class MyMapInitializationHandler implements MapInitializationHandler {

    public void onMapInitialized(MapInitializationEvent event) {
      ScreenContainer container = mapPresenter.addScreenContainer();
      rectangle = new Rectangle(60, 40, 200, 80);
      rectangle.setFillColor("#CC9900");
      rectangle.setFillOpacity(0.4);

      text = new Text(70, 60, "Drag me...");
      text.setFontFamily("Arial");
View Full Code Here

Examples of org.xith3d.shapes.Rectangle

 
  public BranchGroup createScene() {
   
    BranchGroup branchGroup = new BranchGroup();
   
    Rectangle rectangle = new Rectangle(1f, 1f, 0f, ResBag.getTexture( Textures.BACKGROUND_IMAGE.toString() ));
   
    //BackgroundImage backgroundImage = new BackgroundImage( ResBag.getTexture( Textures.BACKGROUND_IMAGE.toString() ), 1f );
   
    branchGroup.addChild( rectangle );
   
View Full Code Here

Examples of pythagoras.f.Rectangle

    }

    protected Rectangle getNativeFieldBounds () {
        Insets insets = resolveStyle(Style.BACKGROUND).insets;
        Point screenCoords = Layer.Util.layerToScreen(layer, insets.left(), insets.top());
        return new Rectangle(screenCoords.x, screenCoords.y,
                             _size.width - insets.width(), _size.height - insets.height());
    }
View Full Code Here

Examples of pythagoras.i.Rectangle

        }

        @Override public int width () { return width; }
        @Override public int height () { return height; }
        @Override public void draw (Surface surface, int x, int y) {
            renderer.render(surface, new Rectangle(x, y, width, height));
        }
View Full Code Here

Examples of resonant.lib.prefab.vector.Rectangle

    this.buttonList.add(new GuiIcon(1, this.width / 2 - 82, this.height / 2 - 16, new ItemStack(Item.pocketSundial)));
    this.buttonList.add(new GuiIcon(2, this.width / 2 - 82, this.height / 2 - 82, null, new ItemStack(Item.redstone), new ItemStack(Block.blockRedstone)));
    this.buttonList.add(new GuiIcon(3, this.width / 2 - 82, this.height / 2 - 60, null, new ItemStack(Block.anvil)));
    this.buttonList.add(new GuiIcon(4, this.width / 2 - 82, this.height / 2 - 38, null, new ItemStack(Item.compass)));

    this.tooltips.put(new Rectangle(new Vector2(117, 44), new Vector2(117, 44).add(18)), LanguageUtility.getLocal("gui.projector.mode"));

    this.tooltips.put(new Rectangle(new Vector2(90, 17), new Vector2(90, 17).add(18)), LanguageUtility.getLocal("gui.projector.up"));
    this.tooltips.put(new Rectangle(new Vector2(90 + 18 * 3, 17), new Vector2(90 + 18 * 3, 17).add(18)), LanguageUtility.getLocal("gui.projector.up"));

    this.tooltips.put(new Rectangle(new Vector2(90, 17 + 18 * 3), new Vector2(90, 17 + 18 * 3).add(18)), LanguageUtility.getLocal("gui.projector.down"));
    this.tooltips.put(new Rectangle(new Vector2(90 + 18 * 3, 17 + 18 * 3), new Vector2(90 + 18 * 3, 17 + 18 * 3).add(18)), LanguageUtility.getLocal("gui.projector.down"));

    String north = LanguageUtility.getLocal("gui.projector.north");
    String south = LanguageUtility.getLocal("gui.projector.south");
    String west = LanguageUtility.getLocal("gui.projector.west");
    String east = LanguageUtility.getLocal("gui.projector.east");

    if (!this.tileEntity.isAbsolute)
    {
      north = LanguageUtility.getLocal("gui.projector.front");
      south = LanguageUtility.getLocal("gui.projector.back");
      west = LanguageUtility.getLocal("gui.projector.left");
      east = LanguageUtility.getLocal("gui.projector.right");
    }

    this.tooltips.put(new Rectangle(new Vector2(90 + 18 * 1, 17), new Vector2(90 + 18 * 1, 17).add(18)), north);
    this.tooltips.put(new Rectangle(new Vector2(90 + 18 * 2, 17), new Vector2(90 + 18 * 2, 17).add(18)), north);

    this.tooltips.put(new Rectangle(new Vector2(90 + 18 * 1, 17 + 18 * 3), new Vector2(90 + 18 * 1, 17 + 18 * 3).add(18)), south);
    this.tooltips.put(new Rectangle(new Vector2(90 + 18 * 2, 17 + 18 * 3), new Vector2(90 + 18 * 2, 17 + 18 * 3).add(18)), south);

    this.tooltips.put(new Rectangle(new Vector2(90, 17 + 18 * 1), new Vector2(90 + 18 * 1, 17 + 18 * 1).add(18)), west);
    this.tooltips.put(new Rectangle(new Vector2(90, 17 + 18 * 2), new Vector2(90 + 18 * 1, 17 + 18 * 2).add(18)), west);

    this.tooltips.put(new Rectangle(new Vector2(90 + 18 * 3, 17 + 18 * 1), new Vector2(90 + 18 * 3, 17 + 18 * 1).add(18)), east);
    this.tooltips.put(new Rectangle(new Vector2(90 + 18 * 3, 17 + 18 * 2), new Vector2(90 + 18 * 3, 17 + 18 * 2).add(18)), east);
  }
View Full Code Here

Examples of shapes.common.Rectangle

    final Shape s = builder.getProduct();
    System.out.println(s.accept(new Size()) + " basic shapes");

    // calculate the bounding box
    final Location b = s.accept(new BoundingBox());
    final Rectangle r = (Rectangle) b.getChild();

    // draw it in a frame centered around the bounding box
    JFrame f = new JFrame();
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    final int padding = 20;
    @SuppressWarnings("serial")
    JPanel p = new JPanel() {
      @Override
      public void paintComponent(Graphics g) {
        g.translate(-b.getX() + padding, -b.getY() + padding);
        s.accept(new Draw(g));
        s.accept(new BoundingBox()).accept(new Draw(g));
      }
    };
    p.setPreferredSize(new Dimension(r.getWidth() + 2 * padding, r.getHeight() + 2 * padding));
    f.setContentPane(p);
    f.pack();
    f.setVisible(true);

    // now draw the same complex group of shapes.impl.composite by hand
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.