How to make stripes

Ross Boylan RossBoylan at stanfordalumni.org
Wed Aug 29 23:35:35 UTC 2001


I want to fill rectangles with stripes.  What's a good way to do this?

It looks as if I might want to use FillStyle's, but
Morph>>fillStyle:  has the comment
"Workaround for Morphs not yet converted"

This suggests fillStyle is on the way out, but I don't know what the 
conversion is from or to.

When I try the following, I get a very mottled looking background:
|a b c|
a _ Form extent: 4 at 4 depth: 32.
c _ Color red.
a 	colorAt: 3 at 1 put: c;
	colorAt: 4 at 1 put: c;
	colorAt: 2 at 2 put: c;
	colorAt: 3 at 2 put: c;
	colorAt: 1 at 3 put: c;
	colorAt: 2 at 3 put: c;
	colorAt: 1 at 4 put: c;
	colorAt: 4 at 4 put: c.
b _ RectangleMorph new.
b color: (InfiniteForm with: a).
b openInHand.

I've also tried vertical stripes (the preceding attempts diagonal stripes), 
but I get the same irregular results.  Perhaps InfiniteForm's do not line 
up as I would expect?





More information about the Squeak-dev mailing list