Skip to content
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

Can i have "match_parent" width on crop area? #16

Open
magdini opened this issue May 2, 2017 · 1 comment
Open

Can i have "match_parent" width on crop area? #16

magdini opened this issue May 2, 2017 · 1 comment
Labels

Comments

@magdini
Copy link

magdini commented May 2, 2017

I want to have the entire crop view as the crop area so i don't see the dark area around the crop area (like for example instagram). Is this possible?

@linkaipeng
Copy link

linkaipeng commented Jun 14, 2017

You can modify setCropRectAccordingToAspectRatio method in class CropIwaOverlayView like this:

private void setCropRectAccordingToAspectRatio() {
        float viewWidth = getMeasuredWidth(), viewHeight = getMeasuredHeight();
        if (viewWidth == 0 || viewHeight == 0) {
            return;
        }
        cropRect.set(0, 0, viewWidth, viewHeight);
    }

But the best way is using the size of bitmap to calculating the size of cropRect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants