[Newbies] Re: Another newbie Morphic question
mike clemow
gelfmuse at gmail.com
Mon Feb 5 19:19:03 UTC 2007
Hello,
Okay, answered my own question:
I subclassed ImageMorph, overriding the initialize method with:
initialize
super initialize.
self image: (Form fromFileNamed: 'ducky.png').
Now I can create a new DuckMorph. Will Squeak support PNG
transparency? I guess I could find that out myself. :)
Cheers,
Mike
On 2/5/07, mike clemow <gelfmuse at gmail.com> wrote:
> Hi All,
>
> I'll be perfectly frank: I'm making a simulation of Robotic Rubber
> Duckies in a swimming pool. Ideally, I'd like to import an image file
> and have my "duckMorph" wear that image as a suit. I have created a
> sketchMorph, but I don't know how to programmatically instruct a morph
> to look like that sketch. I'm not sure I understand the differences
> between sketchMorph and imageMorph. I also am unsure whether I need
> to use an image file read/writer, like PNGReadWriter in order to do
> this. In short, I don't know where to begin.
>
> I'm still in the very early stages of this. At the moment all I want
> to do is create a morph and tell it to wear my duck-suit :) and then
> I'm going to work that code into a proper duckMorph class with the
> appropriate methods to simulate the actual robotic versions.
>
> If someone could just point me in the right direction...
>
> Thanks in advance,
> Mike
>
>
> --
> http://clembie.livejournal.com
> http://shadowofaculture.blogspot.com
> http://deadlylittlepills.com
>
--
http://clembie.livejournal.com
http://shadowofaculture.blogspot.com
http://deadlylittlepills.com
More information about the Beginners
mailing list