[FIX] ThumbnailScaling-nk

Ned Konz ned at bike-nomad.com
Sun Oct 21 06:18:16 UTC 2001


On Saturday 20 October 2001 07:04 pm, Alan Kay wrote:
> However, I seem to recall that the theory behind this was that very
> long objects tended to disappear when reduced linearly in the
> PartsBins ..... this was the reason for the vertical stretch (which I
> also seem to recall that Scott did deliberately and for good purpose
> ....).

That makes sense. I certainly don't want to undo anything that's a desired 
effect.

Perhaps the object itself could be responsible for the thumbnail. I 
have long horizontal objects that were getting distorted by this process. But 
they could supply better thumbnails than just scaled pictures of themselves 
if they were only asked to do so. With my MakerButtons I'm actually doing 
this; instead of the default imageForm the Connectors are returning images of 
themselves with invisible constraints (which otherwise are visible when not 
connected).

Right now the code doesn't let the Morph supply a thumbnail; instead its 
imageForm is computed then scaled:

aThumbnail _ Thumbnail new makeThumbnailFromForm: aMorphClass newStandAlone 
imageForm.

Perhaps we could move this logic into a method in Morph similar to
Morph>>representativeNoTallerThan: maxHeight norWiderThan: maxWidth 
thumbnailHeight: thumbnailHeight
that always returns a Thumbnail with specified size constraints, thus giving 
each Morph a chance to override this logic.

And the original logic would be there for most Morphs that were long and 
horizontal.

-- 
Ned Konz
currently: Stanwood, WA
email:     ned at bike-nomad.com
homepage:  http://bike-nomad.com




More information about the Squeak-dev mailing list