Examples of scaleViewAboutPoint()


Examples of edu.umd.cs.piccolo.PCamera.scaleViewAboutPoint()

    double sf = SVWindow.SCALING_FACTOR;

    if (e.getWheelRotation() < 0) {
      sf = 1 / sf;
    }
    lc.scaleViewAboutPoint(lc.getScale() / sf, e.getPosition().getX(), e
        .getPosition().getY());
  }

  /**
   * The mouse was moved - create an SVET_MOTION event. NOTE: This obviously
View Full Code Here

Examples of edu.umd.cs.piccolo.PCamera.scaleViewAboutPoint()

    // Add a Scrollpane to be able to scroll within the canvas
    PScrollPane scrollPane = new PScrollPane(canvas);
    getContentPane().add(scrollPane);
    scrollPane.setWheelScrollingEnabled(false);
    PCamera lc = canvas.getCamera();
    lc.scaleViewAboutPoint(initialScalingfactor, 0, 0);

    // Disable the default event handlers and add our own.
    addWindowListener(svEventHandler);
    canvas.removeInputEventListener(canvas.getPanEventHandler());
    canvas.removeInputEventListener(canvas.getZoomEventHandler());
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.