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

Oval crop corners added #307

Merged
merged 7 commits into from
Feb 2, 2022
Merged

Conversation

bhagyae5308
Copy link
Contributor

@bhagyae5308 bhagyae5308 commented Jan 25, 2022

The changes are related to #305

  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

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
@bhagyae5308 bhagyae5308 requested a review from a team as a code owner January 25, 2022 10:26
@Canato Canato self-assigned this Jan 25, 2022
Copy link
Member

@Canato Canato left a 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

@Canato
Copy link
Member

Canato commented Jan 28, 2022

@bhagyae5308 the CI is not passing, could you take a look please?

Maybe worth check the CONTRIBUTING for the code style

@bhagyae5308
Copy link
Contributor Author

@Canato Apologies for late update, I was occupied with some other tasks.

Copy link
Member

@Canato Canato left a 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 ^^

  1. 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)
Copy link
Member

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)
Copy link
Member

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"/>
Copy link
Member

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),
Copy link
Contributor Author

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.

@Canato Canato merged commit 65a62af into CanHub:main Feb 2, 2022
@Canato Canato linked an issue Feb 2, 2022 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feat] - Adding circular cropper corner design with custom color support
2 participants