Beginner Question Bezier Curves with Ballon
Andreas Raab
andreas.raab at gmx.de
Sat Oct 25 04:41:31 UTC 2003
> 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
|