[Newbies] Re: How to add a gif or an image to a Morph

Jerome Peace peace_the_dreamer at yahoo.com
Mon Mar 29 02:47:29 UTC 2010

--- On Sun, 3/28/10, FrankBz <kyotosong at libero.it> wrote:

> From: FrankBz <kyotosong at libero.it>
> Subject: [Newbies] Re: How to add a gif or an image to a Morph
> To: beginners at lists.squeakfoundation.org
> Date: Sunday, March 28, 2010, 8:03 AM
> thanks jerome, it works perfectly.. now I'm trying to
> change the image
> accordingly to certain events.. 
> when a just do again backgroundSketch: on my PasteUpMorph,
> it just remove
> the previous content without substituting it with the new
> image..
> I have tried to call deleteBackgroundPainting before
> backgroundSketch: but
> nothing's changed.
> so now the question is, how can I substitute the background
> image properly?
Ah. You've found a way I never tried. I did try to play with it. Looks like it is an invention of Scott Wallace.

What I do for background is use a btimap fill and then select a background.

To do this (for any morph)
red handle menu>fill style>bitmap fill.

Then again
red handle menu>fill style>(you are now presented with bitmap fill options)
select from:
grab new graphic -- this allows you to copy an area of the screen into the bitmap fill.
choose new graphic -- this allows you to choose from graphics that the system knows about. Your sketches graphic should be amoung them somewhere.

once you have choosen your graphic you may need to adjust it:
red handle menu>fill style>
change origin -- this allows you to move the background around until its located correctly in relation to your morph.

change direction -- This allows you to tilt and scale the background.

I suggest you play around with all the fill options. They are fairly interesting.


Yours in curiosity and service, --Jerome Peace


More information about the Beginners mailing list