Sunday, November 8, 2009

New Round Rectangle Example

I an earlier post, I described a round corner rectangle button class. Unfortunately my approach was a bit too hacky for some web browsers to be able to handle. So I have simplified things.

This time I am building the shape out of ONE rectangle using strokeJoin(ROUND) to give me my round corners.



Keyboard Controls are:
r + mouse x = radius
s + mouse x,y = size
p + mouse x,y = position

It's not a class yet. But I think this sketch shows that the concept will work

No comments: