Help with simple graphics

Bolot Kerimbaev bolot at cc.gatech.edu
Thu Sep 23 23:44:46 UTC 1999


Try:

PolygonMorph class>>shapeFromPen:color:borderWidth:borderColor:
- there's an example in the comment, which draws an interesting shape
and creates a PolygonMorph out of it

Also look at:
EllipseMorph, CurveMorph, RectangleMorph

Also try:
Create a new morph (one of the above, for example)
Bring up halos
Choose light blue 'View me' halo
It will create a viewer in a flap for that morph
Now you can control it from the Viewer (forward, turn, etc.)



bolot


On Thu, 23 Sep 1999, Aron Brener wrote:

> Let me start by saying that I'm new on squeak, but have been using 
> VisualWorks for a few months.
> 
> I have to do a project for a class I'm taking relating to shortest 
> path on a maze. As my programs find the solutions, it supposed to 
> show them on the screen. My professor gave us a graphics package we 
> can use for C. I'd prefer to do the project in Smalltalk because I 
> think it'll be a lot easier to implement.
> 
> What I need is a tutorial that'll teach me to do simple stuff in 
> squeak, like drawing squares, lines, maybe use different thicknesses, 
> labels for the lines. I also have to be able to print the screen, 
> although this is not imperative. I guess I could use a screen 
> grabbing utility to do that.
> 
> I was looking for stuff on the web, but every promising link was 
> broken. I've experimented a little, but to find how to do what I need 
> would take me along time. I have a full time job, so I'd like to 
> spend most of my free time on implementing the algorithm rather than 
> playing around.
> 
> Thanks in advance.
> 
> Ari
> -------------------------------------------------------------------------
> Aron Brener		|   Caminante no hay camino,
> brener at home.com	|   se hace camino al andar.
> 			|                 	Antonio Machado
> -------------------------------------------------------------------------
> There's an old story about the person who wished his computer were as
> easy to use as his telephone. That wish has come true, since I no longer
> know how to use my telephone.  -- Bjarne Stroustrup, AT&T, Inventor of C++
> 
> 





More information about the Squeak-dev mailing list