[Cuis-dev] scaling an ImageMorph

Mark Volkmann r.mark.volkmann at gmail.com
Wed Mar 19 14:11:46 PDT 2025


What is the proper way (minimum code) to scale an ImageMorph?
Do I have to scale both the form into which the image file is loaded AND
the ImageMorph like this?

filePath := '/Users/volkmannm/Pictures/images/altitude1600.jpg'.
percent := 0.75.
form := Form fromFileNamed: filePath :: magnifyBy: percent.
morph := ImageMorph newWith: form :: scaleBy: percent.

When I add this morph to a SystemWindow, the image is scaled, but there is
an orange rectangle of the original size behind the image. See the attached
screenshot.

-- 
R. Mark Volkmann
Object Computing, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20250319/fed105ff/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot 2025-03-19 at 4.08.09?PM.png
Type: image/png
Size: 62343 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20250319/fed105ff/attachment-0001.png>


More information about the Cuis-dev mailing list