Skip to content
This repository has been archived by the owner on Jan 27, 2023. It is now read-only.

support to have some square corners with the rest of the corners having the same radius #51

Closed
notice501 opened this issue Sep 1, 2014 · 2 comments

Comments

@notice501
Copy link

Is it possible for you to support to have some square corners with the rest of the corners having the same radius?

@vinc3m1
Copy link
Owner

vinc3m1 commented Sep 1, 2014

Unfortunately not without performance and feature compromises. The library currently depends on this function: [http://developer.android.com/reference/android/graphics/Canvas.html#drawRoundRect(android.graphics.RectF, float, float, android.graphics.Paint)](http://developer.android.com/reference/android/graphics/Canvas.html#drawRoundRect%28android.graphics.RectF, float, float, android.graphics.Paint%29)
Which allows us to have hardware accelerated anti-aliasing with a single draw pass. It wouldn't be hard to write your own drawable that uses one of the other methods like porter-duff xfermode to support some square corners.

@notice501
Copy link
Author

I forked your code and make a option that only have bottom or top corners in a easy way.

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

No branches or pull requests

2 participants