Beginner Question Bezier Curves with Ballon

jrush2 jrush at temple.edu
Sat Oct 25 13:40:47 UTC 2003


Thanks very much.  This answer all the questions I've had.  -Jeff


--- In squeak at yahoogroups.com, "Andreas Raab" <andreas.raab at g...> 
wrote:
> > Maybe I'm asking something easier.  I can't figure out how to 
set up 
> > a BalloonCanvas and draw a Balloon bezier curse on that canvas.
> 
> Try this:
> 
> (Display getCanvas asBalloonCanvas)
> 	aaLevel: 4;
> 	drawBezierShape: {
> 		0 at 0. 		100 at 200. 	200 at 0. 
> 		200 at 0. 	100 at 50. 	0 at 0.
> 	}
> 	color: Color white
> 	borderWidth: 1
> 	borderColor: Color black.
> 
> Note that the points spezify quadratic bezier segments, e.g., the 
first
> three points define the first segment, the next three the second 
segment and
> so on. To insert a straight patch make the intermediate (off-
curve) control
> point the same as either start or end, e.g.,
> 
> (Display getCanvas asBalloonCanvas)
> 	aaLevel: 4;
> 	drawBezierShape: {
> 		0 at 0. 		100 at 200. 	200 at 0. 
> 		200 at 0. 	100 at 50. 	100 at 50.
> 		100 at 50. 	0 at 0. 		0 at 0.
> 	}
> 	color: Color white
> 	borderWidth: 1
> 	borderColor: Color black.
> 
> Hope this helps,
>   - Andreas




More information about the Squeak-dev mailing list