Newbie: help on Form
Joshua 'Schwa' Gargus
schwa at cc.gatech.edu
Tue Nov 20 05:21:45 UTC 2001
Hi,
I would recommend:
1. Creating a Form
form := Form extent: 100 at 100
2. Creating a canvas on the Form
can := FormCanvas on: form
and then using the drawPolygon:... methods in Canvas. This should be
both easier and faster than your current plan.
Joshua
On Mon, Nov 19, 2001 at 08:44:51PM -0800, Hsin-Hao Yu wrote:
>
> 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
|