TouchImageView.java 文件源码

java
阅读 37 收藏 0 点赞 0 评论 0

项目:event-me 作者:
/**
 * Interpolate between where the image should start and end in order to translate
 * the image so that the point that is touched is what ends up centered at the end
 * of the zoom.
 * @param t
 */
private void translateImageToCenterTouchPosition(float t) {
    float targetX = startTouch.x + t * (endTouch.x - startTouch.x);
    float targetY = startTouch.y + t * (endTouch.y - startTouch.y);
    PointF curr = transformCoordBitmapToTouch(bitmapX, bitmapY);
    matrix.postTranslate(targetX - curr.x, targetY - curr.y);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号