How do I resize an ImageMorph?

Peace Jerome peace_the_dreamer at
Sun Nov 27 23:37:56 UTC 2005

Hi Marcus,

Attached is a cs for a Thumbnail image morph which
allows for the scaling of thumbnails of images. This
is inspired by Lex Spoons Popup image morphs which I
took and add my own twist to. It is also available
currently on bob's super swiki at:

SketchMorphs IMHO come with too much inheritance. 
Same with the usual Thumbnail Morphs. I think you will
find these serve your needs well.

These classes and methods work in most normal
circumstances. This is still a work in progress until
I get around to some finishing touches. 

>From the preamble:

'From Squeak3.9alpha of 4 July 2005 [latest update:
#6690] on 15 September 2005 at 7:40:03 pm'!
"Change Set:		PopupThumbnails-wiz
Date:			15 September 2005
Author:			(wiz) Jerome Peace

This is a wiz reworking of Lex Spoons
CDScreenShotMorph from his ChuckDemo image.

PopupThumbnailMorph shows a scaled version of a morph.
Pressing the thumbnail popups a full size (snapshot,
not live) image of the morph.

ThumbnailImageMorph is similar but w/o the pop up

The thumbnails can be scaled somewhat
idiosyncratically with the yellow halo handle. The
idiosyncrasy is that the thumb image tries to retain
its aspect ratio until a certain limit is reached.

Instead of Lex's drag and drop method for obtaining
new images I use a menu item 'sight target' that I
borrowed from my slider fixes. This allows selecting
any morph as the target as long as it is embedded in
the same ubermorph.  This means one can select
submorphs of system windows as well as the windows
themselves for example."

Yahoo! Mail - PC Magazine Editors' Choice 2005

Yahoo! Mail - PC Magazine Editors' Choice 2005
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PopupThumbnails-wiz.4.cs.gz
Type: application/x-gzip
Size: 4351 bytes
Desc: 3898857286-PopupThumbnails-wiz.4.cs.gz
Url :

More information about the Squeak-dev mailing list