[Squeakland] drawing on images
Scott Wallace
scott.wallace at squeakland.org
Thu Dec 23 04:23:14 PST 2004
Hi, Randy,
Only PasteUpMorphs (a.k.a. Playfields) are equipped to accommodate
pen trails. So the way to get pen trails drawn on an imported
graphic is to make the imported graphic be the "background" of a
playfield.
This is easy enough to do in a variety of ways but there is no
one-step command to do it -- though probably there should be.
Here's one way: Get a fresh playfield from Supplies; from its debug
halo handle choose "inspect morph"; in the bottom pane of the
resulting Inspector type and then evaluate an expression like:
self backgroundForm: (Form fromFileNamed: 'myGraphic.jpeg')
where you have substituted the correct file name.
If you have a graphic previously "imported" into Squeak, with name
"myGraphic", you could instead use something like:
self backgroundForm: (Imports default imports at: 'myGraphic')
Another slightly more tedious way that doesn't involve evaluating any
smalltalk expressions is to "open" the graphic from a file-list (into
a Sketch which you rename, say, "myPicture,") and then build an etoy
script for the playfield of the following form, and run it once:
Cheers,
-- Scott
At 7:26 PM -0500 12/20/04, Randy Heiland wrote:
>Is there any way to have my (pen down) objects draw over the top of imported
>images?
>
>--Randy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: P304329A3_2
Type: image/png
Size: 31200 bytes
Desc: not available
Url : http://squeakland.org/pipermail/squeakland/attachments/20041223/d3dbec66/P304329A3_2-0001.png
More information about the Squeakland
mailing list