Package org.geomajas.gwt.client.spatial

Examples of org.geomajas.gwt.client.spatial.Matrix


    IButton button8 = new IButton(I18nProvider.getSampleMessages().renderingTransform());
    button8.addClickHandler(new ClickHandler() {

      public void onClick(ClickEvent event) {
        map.getVectorContext().drawGroup(map.getGroup(RenderGroup.SCREEN), group1,
            new Matrix(0, 0, 0, 0, 150, 00));
        map.getVectorContext().drawGroup(map.getGroup(RenderGroup.SCREEN), group2,
            new Matrix(0, 0, 0, 0, 0, 100));
      }
    });
    button8.setWidth100();
    column3.addMember(button8);
View Full Code Here


  /** Return the world-to-view space transformation matrix. */
  public Matrix getWorldToViewTransformation() {
    if (viewState.getScale() > 0) {
      double dX = -(viewState.getX() * viewState.getScale()) + width / 2;
      double dY = viewState.getY() * viewState.getScale() + height / 2;
      return new Matrix(viewState.getScale(), 0, 0, -viewState.getScale(), dX, dY);
    }
    return new Matrix(1, 0, 0, 1, 0, 0);
  }
View Full Code Here

  /** Return the world-to-view space translation matrix. */
  public Matrix getWorldToViewTranslation() {
    if (viewState.getScale() > 0) {
      double dX = -(viewState.getX() * viewState.getScale()) + width / 2;
      double dY = viewState.getY() * viewState.getScale() + height / 2;
      return new Matrix(1, 0, 0, 1, dX, dY);
    }
    return new Matrix(1, 0, 0, 1, 0, 0);
  }
View Full Code Here

  /** Return the world-to-pan space translation matrix. */
  public Matrix getWorldToPanTransformation() {
    if (viewState.getScale() > 0) {
      double dX = -(viewState.getPanX() * viewState.getScale());
      double dY = viewState.getPanY() * viewState.getScale();
      return new Matrix(viewState.getScale(), 0, 0, -viewState.getScale(), dX, dY);
    }
    return new Matrix(1, 0, 0, 1, 0, 0);
  }
View Full Code Here

   */
  public Matrix getPanToViewTranslation() {
    if (viewState.getScale() > 0) {
      double dX = -((viewState.getX() - viewState.getPanX()) * viewState.getScale()) + width / 2;
      double dY = (viewState.getY() - viewState.getPanY()) * viewState.getScale() + height / 2;
      return new Matrix(1, 0, 0, 1, dX, dY);
    }
    return new Matrix(1, 0, 0, 1, 0, 0);
  }
View Full Code Here

   */
  public Matrix getWorldToPanTranslation() {
    if (viewState.getScale() > 0) {
      double dX = -(viewState.getPanX() * viewState.getScale());
      double dY = viewState.getPanY() * viewState.getScale();
      return new Matrix(1, 0, 0, 1, dX, dY);
    }
    return new Matrix(1, 0, 0, 1, 0, 0);
  }
View Full Code Here

  }

  /** Return the world-to-view space translation matrix. */
  public Matrix getWorldToViewScaling() {
    if (viewState.getScale() > 0) {
      return new Matrix(viewState.getScale(), 0, 0, -viewState.getScale(), 0, 0);
    }
    return new Matrix(1, 0, 0, 1, 0, 0);
  }
View Full Code Here

      }
    }
  }

  private Bbox worldToPan(Bbox bounds) {
    Matrix t = rasterLayer.getMapModel().getMapView().getWorldToPanTransformation();
    return bounds.transform(t);
  }
View Full Code Here

    Matrix t = rasterLayer.getMapModel().getMapView().getWorldToPanTransformation();
    return bounds.transform(t);
  }

  private void addTiles(List<org.geomajas.layer.tile.RasterTile> images) {
    Matrix t = rasterLayer.getMapModel().getMapView().getWorldToPanTranslation();
    Bbox cacheBounds = null;
    for (org.geomajas.layer.tile.RasterTile image : images) {
      TileCode code = image.getCode().clone();
      if (!tiles.containsKey(code)) {
        Bbox panBounds = new Bbox(image.getBounds());
        panBounds.translate(Math.round(t.getDx()), Math.round(t.getDy()));
        if (cacheBounds == null) {
          cacheBounds = panBounds;
        } else {
          cacheBounds = cacheBounds.union(panBounds);
        }
View Full Code Here

TOP

Related Classes of org.geomajas.gwt.client.spatial.Matrix

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.