Metron icon indicating copy to clipboard operation
Metron copied to clipboard

Support for ellipses

Open matt-curtis opened this issue 6 years ago • 3 comments

Metron is a lovely little library and has saved me a ton of time! Circle works for some cases, but not for ellipses. Seeing this officially supported would be great.

matt-curtis avatar Sep 22 '17 11:09 matt-curtis

Hey @matt-curtis, thanks for the compliment, and for your suggestion! Of course, a circle is not an ellipse, but it would be better indeed if ellipses were part of the library. Can you give some suggestions to how you would use such an entity, and what you'd hope to have available to you in terms of properties, functions and such?

toineheuvelmans avatar Sep 25 '17 14:09 toineheuvelmans

Not very much. The main uses I needed from an Ellipse type was 1. being able to get the area 2. telling whether or not a point falls within the ellipse 3. the bounding rectangle. I ended up quickly building something on top of CGPath(ellipseIn:, transform:).

matt-curtis avatar Sep 25 '17 20:09 matt-curtis

+1 to having Ellipse(), including Ellipse(in:CGRect).

davidbjames avatar Jan 14 '18 12:01 davidbjames