Morph color question
Bob Arning
arning at charm.net
Thu Aug 2 01:38:11 UTC 2001
Timothy,
That's an interesting one. The properties panel that changes the primary color of a morph uses #fillStyle: to do so. Normally, this would set the <color> slot of a morph, but in the case of a PolygonMorph which is open (i.e. one that is just one or more line segments), this message is implemented to change the border color instead, since <color> would be used to fill the interior and there is no interior.
Cheers,
Bob
On Wed, 1 Aug 2001 21:23:40 -0400 Timothy Reaves <treaves at silverfields.com> wrote:
> I am playing with Squeak and the LG tutorial series. This is the code in question:
> World addMorph:
> (PolygonMorph
> vertices: {50 at 50. 200 at 200}
> color: Color red
> borderWidth: 20
> borderColor: Color red)
>
> As the article suggests, I play with the halos. One of them gives the option to inspect the object, and another the option to change the color. I select to change the color. I chnage it to a nice blueish green. I then select to inspect it.
>
> The inspector opens, and I'm looking around. I choose to see the instance variables (All inst vars). To my surprise, the color attribute is : Color red. How can this be? I changed the color with the color selector.
More information about the Squeak-dev
mailing list
|