[FIX] ThumbnailScaling-nk

Ned Konz ned at bike-nomad.com
Sun Oct 21 19:38:50 UTC 2001


On Sunday 21 October 2001 12:57 pm, Lex Spoon wrote:
> > 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.
>
> That sounds like an excellent design, Ned!  Why three arguments, though,
> instead of just two (width and height) ?  What's the difference between
> the thumbnail height and the max height?

Well, the one I quoted already exists. But here's the problem: we have a 
certain max rectangle that we want thumbnails to fit into. And we have a 
desire to make them at least a certain size. So really, we want two 
rectangles: a minimum rectangle that the thumbnail has to be larger than (in 
one or both dimensions), and a max rectangle that it has to fit inside for 
layout reasons.

I think the thumbnailHeight in the above is the same thing as the 
minimumHeight in Thumbnail; perhaps there weren't too many vertical skinny 
Morphs to worry about.

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




More information about the Squeak-dev mailing list