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

Request: Rectangle with rounded corners? #10

Open
rowild opened this issue Feb 23, 2016 · 1 comment
Open

Request: Rectangle with rounded corners? #10

rowild opened this issue Feb 23, 2016 · 1 comment

Comments

@rowild
Copy link

rowild commented Feb 23, 2016

I hope this is not too bold, but I give it a try - please forgive me, if it's unfriendly or ...!

I fail trying to build a rectangle with rounded corners. Any chance you could implement such a feature?

@BenjaminDRichards
Copy link
Contributor

This would be a nice feature. We didn't have the time to implement it during development. If we can find the time, we'll certainly look at it again.

The only issue with a rounded-corner rect is that it is quite geometrically heavy. This may overcome some of the advantages of rendering simple primitives. However, there may be ways around this in the near future.

In the interim, I can think of two replacements:

  • Create a Group of primitives with circles in the corners and rectangles filling in the middle. The stroke will fail to achieve anything sensible, but for flat areas, it should work.
  • Create an HTML5 canvas element and use standard draw tools such as lineTo and arc to define a fill area. Then assign the canvas to a new texture atlas in KiwiJS. This will blur when it scales, but will render fast.

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

No branches or pull requests

2 participants