當前位置: 首頁>>代碼示例>>Java>>正文


Java Viewport.getTransform方法代碼示例

本文整理匯總了Java中com.ait.lienzo.client.core.shape.Viewport.getTransform方法的典型用法代碼示例。如果您正苦於以下問題:Java Viewport.getTransform方法的具體用法?Java Viewport.getTransform怎麽用?Java Viewport.getTransform使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.ait.lienzo.client.core.shape.Viewport的用法示例。


在下文中一共展示了Viewport.getTransform方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: adjustViewportTransform

import com.ait.lienzo.client.core.shape.Viewport; //導入方法依賴的package包/類
private void adjustViewportTransform(final Viewport vp,
                                     final Point2D delta) {
    final Transform transform = vp.getTransform();
    final Transform t = transform.copy().getInverse();
    final Point2D translation = new Point2D(t.getTranslateX(),
                                            t.getTranslateY()).mul(-1.0);

    final double scaleX = transform.getScaleX();
    final double scaleY = transform.getScaleY();
    transform.reset();

    final Point2D frameLocation = translation.add(delta);
    transform.scale(scaleX,
                    scaleY).translate(frameLocation.getX(),
                                      frameLocation.getY());
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:17,代碼來源:BaseKeyboardOperation.java

示例2: flipToGridWidget

import com.ait.lienzo.client.core.shape.Viewport; //導入方法依賴的package包/類
@Override
public void flipToGridWidget(final GridWidget gridWidget) {
    if (!isGridPinned()) {
        return;
    }
    for (GridWidget gw : gridWidgets) {
        gw.setAlpha(gw.equals(gridWidget) ? 1.0 : 0.0);
        gw.setVisible(gw.equals(gridWidget));
    }

    final Point2D translation = new Point2D(gridWidget.getX(),
                                            gridWidget.getY()).mul(-1.0);
    final Viewport vp = gridWidget.getViewport();
    final Transform transform = vp.getTransform();
    transform.reset();
    transform.translate(translation.getX(),
                        translation.getY());

    updatePinnedContext(gridWidget);

    batch(new GridLayerRedrawManager.PrioritizedCommand(0) {
        @Override
        public void execute() {
            select(gridWidget);
        }
    });
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:28,代碼來源:DefaultGridLayer.java

示例3: updateVisibleBounds

import com.ait.lienzo.client.core.shape.Viewport; //導入方法依賴的package包/類
private void updateVisibleBounds() {
    final Viewport viewport = getViewport();
    Transform transform = viewport.getTransform();
    if (transform == null) {
        viewport.setTransform(transform = new Transform());
    }
    final double x = (PADDING - transform.getTranslateX()) / transform.getScaleX();
    final double y = (PADDING - transform.getTranslateY()) / transform.getScaleY();
    bounds.setX(x);
    bounds.setY(y);
    bounds.setHeight(Math.max(0,
                              (viewport.getHeight() - PADDING * 2) / transform.getScaleX()));
    bounds.setWidth(Math.max(0,
                             (viewport.getWidth() - PADDING * 2) / transform.getScaleY()));
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:16,代碼來源:DefaultGridLayer.java

示例4: getTransform

import com.ait.lienzo.client.core.shape.Viewport; //導入方法依賴的package包/類
Transform getTransform() {
    final Viewport viewport = getDefaultGridLayer().getViewport();

    return viewport.getTransform();
}
 
開發者ID:kiegroup,項目名稱:appformer,代碼行數:6,代碼來源:GridLienzoScrollPosition.java


注:本文中的com.ait.lienzo.client.core.shape.Viewport.getTransform方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。