-
-
Notifications
You must be signed in to change notification settings - Fork 263
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
Oval crop corners added #307
Conversation
1. Added provision to add Oval crop corners when the crop style is Rectangle 2. Setters exposed to had crop corner radius and fill color
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't finish the review yet, will give it more attention tomorrow probably, but great work =D
Thanks for this, raise some minor stuffs
cropper/src/main/java/com/canhub/cropper/CropImageContractOptions.kt
Outdated
Show resolved
Hide resolved
cropper/src/main/java/com/canhub/cropper/CropImageContractOptions.kt
Outdated
Show resolved
Hide resolved
@bhagyae5308 the CI is not passing, could you take a look please? Maybe worth check the CONTRIBUTING for the code style |
@Canato Apologies for late update, I was occupied with some other tasks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No worries about the time, all work here is volunteer you are already adding great value to the lib! and i'm thankful for this!
Now I had time to check with more attention ^^
- We need to update the CHANGELOG
Almost ready to go 🎉
|
||
/** | ||
* To set the fill color of the Oval crop corner | ||
* @param circleFillColorHexValue Hex value of the color (Default is MAGENTA) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's change the default to White please
@@ -531,6 +568,8 @@ class CropOverlayView | |||
canvas | |||
) | |||
} | |||
// To retain the changes in Paint object when the App goes background this is required | |||
mBorderCornerPaint = getNewPaintOrNull(mOptions?.borderCornerThickness ?: 0.0f, mOptions?.borderCornerColor ?: Color.WHITE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool
@@ -52,6 +52,9 @@ | |||
<include | |||
android:id="@+id/cropShape" | |||
layout="@layout/chip_crop_shape" /> | |||
<include android:id="@+id/cornerShape" | |||
layout="@layout/chip_corner_shape" | |||
android:visibility="gone"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice touch. Can see you are a detailed dev, thanks for it
@@ -908,28 +908,28 @@ class CropOverlayView | |||
) { | |||
// Top left | |||
canvas.drawCircle( | |||
rect.left, | |||
rect.left - cornerExtension, | |||
(rect.top - cornerExtension), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added this change to align properly the corners over the edges of the rectangle. Observed this while checking it for smaller radius.
The changes are related to #305