2009/2/10 Gary Chambers <gazzagu...@btinternet.com>:
> Rounded things are tricky to do with no direct support in canvas/balloon.
>

I did some experimenting to draw a rounded rects using balloon bezier curves..
I was disappointed in speed :(

Moreover, if border is drawn w/o antialiasing, it looks very ugly and
inaccurate.

Also, balloon using different bordering logic. It does not insets
border inside a shape's area, instead it using a shape segment as a
guide to draw a border around it , i.e. if you drawing a horizontal
line at y=0 with border width = 3, then border will fill y=-1, y=0 ,
y=1 .

You can look a results on attached images.
A code used to draw them:
(RoundedRectShape new rect: (1...@10 corner: 1...@100)) drawOn: World 
assuredCanvas


-- 
Best regards,
Igor Stasenko AKA sig.

<<attachment: no-border.gif>>

<<attachment: border-1px.gif>>

<<attachment: border-10px.gif>>

<<attachment: border-1px-noAA.gif>>

_______________________________________________
Pharo-project mailing list
Pharo-project@lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to