Examples of Rect


Examples of org.antlr.xjlib.appkit.gview.base.Rect

        delegate.changeOccured();
    }

    public void selectElementsInRect(int x, int y, int dx, int dy) {
        Rect rectangle = new Rect(x, y, dx, dy);
        if(rootElement == null || rootElement.getElements() == null)
            return;

        for (GElement element : rootElement.getElements()) {
            boolean selected = Rect.intersect(rectangle, element.bounds());
View Full Code Here

Examples of org.apache.flex.swf.types.Rect

            {
                flexFontInfo = new FlexFontInfo(((DefineFont4Tag)symbolTag).isFontFlagsBold(), ((DefineFont4Tag)symbolTag).isFontFlagsItalic());               
            }
        }

        Rect swfSize = swf.getFrameSize();
        if (swfSize != null)
        {
            swfWidth =  swfSize.getWidth() / ISWFConstants.TWIPS_PER_PIXEL;
            swfHeight = swfSize.getHeight() / ISWFConstants.TWIPS_PER_PIXEL;
        }
        else
        {
            result = false;
        }
View Full Code Here

Examples of org.eclipse.swt.internal.carbon.Rect

Rectangle getControlBounds (int control) {
  if (OS.HIVIEW) {
    CGRect rect = new CGRect ();
    OS.HIViewGetFrame (control, rect);
    Rect inset = getInset ();
    rect.x -= inset.left;
    rect.y -= inset.top;
    rect.width += inset.right + inset.left;
    rect.height += inset.bottom + inset.top;
    return new Rectangle ((int) rect.x, (int) rect.y, (int) rect.width, (int) rect.height);
  }
  Rect rect = new Rect();
  OS.GetControlBounds (control, rect);
  int window = OS.GetControlOwner (control);
  int [] theRoot = new int [1];
  OS.GetRootControl (window, theRoot);
  int [] parentHandle = new int [1];
  OS.GetSuperControl (control, parentHandle);
  if (parentHandle [0] != theRoot [0]) {
    Rect parentRect = new Rect ();
    OS.GetControlBounds (parentHandle [0], parentRect);
    OS.OffsetRect (rect, (short) -parentRect.left, (short) -parentRect.top);
  }
  Rect inset = getInset ();
  rect.left -= inset.left;
  rect.top -= inset.top;
  rect.right += inset.right;
  rect.bottom += inset.bottom;
  return new Rectangle (rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top);
View Full Code Here

Examples of org.eclipse.swt.internal.win32.RECT

   * @return the rectangle information of the specified window.
   *
   */
  public static Rectangle getWindowRect(int hwnd)
  {
    RECT rect = new RECT();
    Extension.GetWindowRect(hwnd, rect);
    return new Rectangle(rect.left, rect.top, rect.right - rect.left, rect.bottom
        - rect.top);
  }
View Full Code Here

Examples of org.matheusdev.util.collision.Rect

    this.map = new HashMap<>();
    this.queryList = new ArrayList<>();
  }

  public void add(E e) {
    Rect rect = e.getAABB();

    int beginx = ((int) rect.x) / width;
    int beginy = ((int) rect.y) / height;
    int endx = ((int) (rect.x + rect.w)) / width;
    int endy = ((int) (rect.y + rect.h)) / height;
View Full Code Here

Examples of org.mati.geotech.model.Rect

import org.mati.geotech.model.Rect;

public class GoogleMapPathMaker extends PathMaker {
  public String makePathFor(Rect cell, Rect start) {
    String path = "t";
    Rect r = new Rect(0,0,0,0);
   
    r.setSameGeometry(start);
   
    while(cell.haveOverlap(r) && r.getWidth() > cell.getWidth()) {
      // 0 - q, 1 - r,  2 - t, 3 - s
      Rect [] sl = r.newFourBySplit();
      if(cell.haveOverlap(sl[0])) {
        r.setSameGeometry(sl[0]);
        path+="q";
      }
      else if(cell.haveOverlap(sl[1])) {
        r.setSameGeometry(sl[1]);
        path+="r";
      }
      else if(cell.haveOverlap(sl[2])) {
        r.setSameGeometry(sl[2]);
        path+="t";
      }
      else if(cell.haveOverlap(sl[3])) {
        r.setSameGeometry(sl[3]);
        path+="s";
      } else {
        System.out.println("error in: "+path);
        return null;
      }
View Full Code Here

Examples of org.mati.geotech.model.Rect

public class VirtualMapPathMaker extends PathMaker {

  @Override
  public String makePathFor(Rect cell, Rect start) {
    String path = "";
    Rect r = new Rect(0,0,0,0);
   
    r.setSameGeometry(start);
   
    while(cell.haveOverlap(r) && r.getWidth() > cell.getWidth()) {
      // 0 - q, 1 - r,  2 - t, 3 - s
      Rect [] sl = r.newFourBySplit();
      if(cell.haveOverlap(sl[0])) {
        r.setSameGeometry(sl[0]);
        path+="0";
      }
      else if(cell.haveOverlap(sl[1])) {
        r.setSameGeometry(sl[1]);
        path+="1";
      }
      else if(cell.haveOverlap(sl[2])) {
        r.setSameGeometry(sl[2]);
        path+="2";
      }
      else if(cell.haveOverlap(sl[3])) {
        r.setSameGeometry(sl[3]);
        path+="3";
      } else {
        System.out.println("error in: "+path);
        return null;
      }
View Full Code Here

Examples of org.mati.geotech.model.Rect

            gl.glTexEnvi(GL.GL_TEXTURE_ENV, GL.GL_TEXTURE_ENV_MODE,
                    GL.GL_REPLACE);
            for (int i = 0; i < cellCover.getCellCountH(); i++) {
                for (int j = 0; j < cellCover.getCellCountW(); j++) {
                    if (mapGrid[i][j]
                            .haveOverlap(new Rect(-180, -90, 360, 180)))
                        drawCell(gl, mapGrid[i][j]);
                }
            }
        }
    }
View Full Code Here

Examples of org.mati.geotech.model.Rect

    // System.out.println("splitNode()");
    int i1=0, i2=1,i1max=0,i2max=1;
    double aspendMax = 0;
    double aspend=0;
   
    Rect r1,r2;
    for(i1=1; i1 < node.getChildCount(); i1++) {
      r1 = node.getChildren().get(i1).getRect();
      for(i2=0; i2 < node.getChildCount(); i2++) {
        r2 = node.getChildren().get(i2).getRect();
        aspend = r1.getBoundRectWith(r2).getArea() - r1.getArea() - r2.getArea();
        if(aspend > aspendMax) {
          aspendMax = aspend;
          i1max=i1; i2max=i2;
        }
       
View Full Code Here

Examples of org.mati.geotech.model.Rect

    else path.add(node);
   
    Vector<RNode> snodes = node.getChildren();
   
    int iMin = 0;
    Rect minRect = snodes.get(0).getRect().getBoundRectWith(newElement);
    for(int i = 1; i < snodes.size(); i++) {
      Rect nodeRect=snodes.get(i).getRect();
      if(nodeRect.getBoundRectWith(newElement).getArea() < minRect.getArea()) {
        minRect=nodeRect.getBoundRectWith(newElement);
        iMin=i;
      }
    }
    //path.add(snodes.get(iMin));
    return chooseLeaf(newElement, snodes.get(iMin),path);
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.