Newbie: help on Form

Hsin-Hao Yu hhyu at Cogsci.ucsd.edu
Tue Nov 20 04:44:51 UTC 2001


Hello! This is an extremely newbie question. I just started to use
Squeak to construct visual stimuli for some brain imaging experiments,
but I am quite intimidated by Squeak's drawing primitives, and the lack
of documentation. 

The problem is simple: I want to draw a bunch of polygons filled
with colors, but it has to be drawn as fast as possible, since
timing is critical. What is the best way to do this in Squeak?

My plan is:
1. create a Form
2. use the drawLine:from:to:clippingBox:rule:fillColor method
   to draw the edges of the polgons.
3. use of of the methods in the "filling" category of the Form class
   to paint color to the polygon

I am stucked by two problems:
1. I have no idea what the arguments to "drawLine:from:to:clippingBox:
   rule:fillColor" should be. What is a "source"? what rule?
2. I want to choose a filling algorithm that is as efficient as possible
   for simply polygons.

Would someone be so kind of help a beginner? In return to the community
I would share the result when it is finished, as an example of using the
Form class. Thanx a lot.






More information about the Squeak-dev mailing list