Skip to content

Commit

Permalink
bug fiexed 修复 缩放后裁剪 选框大小异常的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
siwangqishiq committed Apr 21, 2018
1 parent a83f4d3 commit 9256f04
Showing 1 changed file with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,18 @@ public void onShow() {
activity.mainImage.setImageBitmap(activity.getMainBit());
activity.mainImage.setDisplayType(ImageViewTouchBase.DisplayType.FIT_TO_SCREEN);
activity.mainImage.setScaleEnabled(false);// 禁用缩放
//
RectF r = activity.mainImage.getBitmapRect();
activity.mCropPanel.setCropRect(r);
// System.out.println(r.left + " " + r.top);
activity.bannerFlipper.showNext();

// bug fixed https://github.com/siwangqishiq/ImageEditor-Android/issues/59
// 设置完与屏幕匹配的尺寸 确保变换矩阵设置生效后才设置裁剪区域
activity.mainImage.post(new Runnable() {
@Override
public void run() {
final RectF r = activity.mainImage.getBitmapRect();
activity.mCropPanel.setCropRect(r);
}
});
}

/**
Expand Down

0 comments on commit 9256f04

Please sign in to comment.