/** * Scrolls (with animation) the TileView to the x and y positions provided, then centers the * viewport to the position. * * @param x The relative x position to move to. * @param y The relative y position to move to. */ public void slideToAndCenter(double x, double y) { slideToAndCenter( mCoordinateTranslater.translateAndScaleX(x, getScale()), mCoordinateTranslater.translateAndScaleY(y, getScale())); }
/** * Scrolls and scales (with animation) the TileView to the specified x, y and scale provided. The * TileView will be centered to the coordinates passed. * * @param x The relative x position to move to. * @param y The relative y position to move to. * @param scale The scale the TileView should be at when the animation is complete. */ public void slideToAndCenterWithScale(double x, double y, float scale) { slideToAndCenterWithScale( mCoordinateTranslater.translateAndScaleX(x, scale), mCoordinateTranslater.translateAndScaleY(y, scale), scale); }
/** * Scrolls (instantly) the TileView to the x and y positions provided. The is an overload of * scrollTo( int x, int y ) that accepts doubles; if the TileView has relative bounds defined, * those relative doubles will be converted to absolute pixel positions. * * @param x The relative x position to move to. * @param y The relative y position to move to. */ public void scrollTo(double x, double y) { scrollTo( mCoordinateTranslater.translateAndScaleX(x, getScale()), mCoordinateTranslater.translateAndScaleY(y, getScale())); }