[squeak-dev] Re: Round rect drawing

Andreas Raab andreas.raab at gmx.de
Fri Jul 24 07:15:03 UTC 2009


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:

(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.

Cheers,
   - Andreas



More information about the Squeak-dev mailing list