-
Notifications
You must be signed in to change notification settings - Fork 458
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Overlay drawing is lacking when selecting certain photos #57
Comments
Hi, I fixed the bug. Please use the version 1.1.3. |
Thank you for taking the time to look at this issue. Will test the new version ASAP. |
The problem is solved. I took a look at the commit and I was wondering if the same logic should be applied to circle mode. Maybe something like this: RectF overlayRect = new RectF((float) Math.floor(mImageRect.left),
(float) Math.floor(mImageRect.top),
(float) Math.ceil(mImageRect.right),
(float) Math.ceil(mImageRect.bottom));
if (!mIsAnimating
&& (mCropMode == CropMode.CIRCLE || mCropMode == CropMode.CIRCLE_SQUARE)) {
path.addRect(overlayRect, Path.Direction.CW);
PointF circleCenter = new PointF((mFrameRect.left + mFrameRect.right) / 2,
(mFrameRect.top + mFrameRect.bottom) / 2);
float circleRadius = (mFrameRect.right - mFrameRect.left) / 2;
path.addCircle(circleCenter.x, circleCenter.y, circleRadius, Path.Direction.CCW);
canvas.drawPath(path, mPaintTranslucent);
} else {
path.addRect(overlayRect, Path.Direction.CW);
path.addRect(mFrameRect, Path.Direction.CCW);
canvas.drawPath(path, mPaintTranslucent);
} What do you think @IsseiAoki? |
Hi, @mblcdr Thank you for pointing out my mistake. |
When I select certain photos overlay drawing is lacking a line in top and/or bottom. Here's a screenshot of what is happening:
As you can see in the screenshot above, the top line of overlay is not getting drawn.
Here is how I am using CropImageView
Let me know if you need more info.
I can also email you the original photo which caused this.
The text was updated successfully, but these errors were encountered: