[squeak-dev] Re: Round rect drawing
Igor Stasenko
siguctua at gmail.com
Fri Jul 24 07:24:45 UTC 2009
2009/7/24 Andreas Raab <andreas.raab at gmx.de>:
> Igor Stasenko wrote:
>>
>> Want to ask, is this a sign of making
>> #roundCornersOf:during:
>> & friends deprecated and use a new direct messages instead whenever it
>> should be used?
>
> Probably not. #roundCornersOf:during: is a modification to regular rectangle
> drawing and works on clients that don't know anything about supporting round
> rects explicitly. It would be tricky trying to use roundRect drawing
> explicitly everywhere and this really wasn't the driving use case. The use
> case was to be able to support round-rect drawing with a different corner
> radius / border width than the one and only supported by corner rounder. For
> example, compare this:
>
IMHO, it is a dirty hack to draw rounded shapes, when drawing code
telling you to draw a rectangle.
This is plain wrong, especially for a canvas, who should perform any
actions strictly as they passed from outside by callers.
That's why i would prefer to never see things like
#roundCornersOf:during: again.
> (RectangleMorph new)
> bounds: (100 at 100 extent: 200 at 50);
> color: Color white;
> borderWidth: 5;
> useRoundedCorners;
> fullDrawOn: Display getCanvas.
>
>
> vs.
>
> (Display getCanvas)
> frameAndFillRoundRect: (100 at 200 extent: 200 at 50)
> radius: 20
> fillStyle: Color white
> borderWidth: 5
> borderColor: Color black.
>
the last one wins.
> Cheers,
> - Andreas
>
>
--
Best regards,
Igor Stasenko AKA sig.
More information about the Squeak-dev
mailing list
|