Package org.rascalmpl.library.vis.util.vector

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


    scrollableMinSize = new BoundingBox(MIN_SIZE + scrollbarSize.getX(), MIN_SIZE+ scrollbarSize.getY());
    swtVisiblityMangager = new SWTElementsVisibilityManager();
    zorderManager = new SWTZOrderManager(parent,overlapFigures);
    gc = new SWTGraphicsContext();
    topLevel = new TransformMatrix();
    viewPortRectangle = new Rectangle(viewPortLocation, viewPortSize);
  }
View Full Code Here

        figure.size.set(d,figure.minSize.get(d));
      } else {
        figure.size.set(d,viewPortSize.get(d));
      }
    }
    Rectangle part = getViewPortRectangle();
    figure.resize(part,topLevel);
  }
View Full Code Here

    figure.resize(part,topLevel);
  }
 
  private void distributeExtraSize(){
    figure.size.set(viewPortSize);
    Rectangle part = getViewPortRectangle();
    figure.resize(part,topLevel);
  }
View Full Code Here

    figure.resize(part,topLevel);
  }
 
  private void  distributeSizeWidthDependsOnHeight(){
    figure.size.set(viewPortSize);
    Rectangle part = getViewPortRectangle();
    figure.resize(part,topLevel);
  }
View Full Code Here

    if(viewPortSize.contains(figure.getMinViewingSize())){
      distributeExtraSize();
    } else {
      resetToMinSize();
    }
    Rectangle part = getViewPortRectangle();
    adjustOverlaps(part);
    updateScrollBars();
    parent.notifyLayoutChanged();
  }
View Full Code Here

     
      ScrollBar bar = scrollBars.get(d);
     
      if(bar != null){
        viewPortLocation.set(d,bar.getSelection());
        Rectangle part = getViewPortRectangle();
        adjustOverlaps(part);
      } else {
      }
    }
    parent.requestRedraw();
View Full Code Here

      gc.setGC(new GC(backbuffer));
    }
   
    gc.getGC().setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_WHITE));
   
    Rectangle part = getViewPortRectangle();
    gc.getGC().fillRectangle(0, 0, FigureMath.ceil(part.getSize().getX()), FigureMath.ceil(part.getSize().getY()));
    gc.translate(-part.getLocation().getX(), -part.getLocation().getY());

   
    figure.draw(zoom, gc, part,swtVisiblityMangager.getVisibleSWTElementsVector());
    for(Overlap f : overlapFigures){
      if(f.over.overlapsWith(part)){
        f.over.draw(zoom, gc, part, swtVisiblityMangager.getVisibleSWTElementsVector());
      }
    }
    gc.translate(part.getLocation().getX(), part.getLocation().getY());
   

   
    gc.dispose();
    swtGC.drawImage(backbuffer, 0, 0);
View Full Code Here

  public void drawChildren(Coordinate zoom, GraphicsContext gc,
      Rectangle part, List<IHasSWTElement> visibleSWTElements) {
    for(Figure f : children){
      //if(f.overlapsWith(part)){
        Rectangle npart = f.isContainedIn(part) ? null : part;
        f.draw(zoom, gc, npart, visibleSWTElements);
      //}
    }
  }
View Full Code Here

  public boolean isContainedIn(Rectangle r){
    return  r == null || r.contains(globalLocation,size);
  }
 
  public Rectangle getRectangle(){
    return new Rectangle(globalLocation, size);
  }
View Full Code Here

TOP

Related Classes of org.rascalmpl.library.vis.util.vector.Rectangle

Copyright © 2018 www.massapicom. 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.