[Cuis-dev] scaling an ImageMorph
Hilaire Fernandes
hfern at free.fr
Sun Mar 23 04:47:47 PDT 2025
Mark, from my understanding what you want to use is the *scale* command
not the *resize* which are not interchangeable. This is the blue icon in
the image morph. *Only for non PlacedMorph*, resize will behave as scale
but because there is not notion of extent, so resize does not make sense
in that respect.
This halo's icon translate to messages:
* *scale --> #scale:*
* *resize --> #morphExtent:
*
If you want a different behavior, you need to subclass ImageMorph, which
make sense in that circumstance. You want the form to be recomputed at
each morphExtent to fill the space in ox or oy axes? It will be more
computer intensive and will have to remember also the original Form
otherwise you may end with a one pixel Form. But I suspect using the
#scale:/#scaleBy: message is just what you want.
Look at the code of ImageMorph and you will understand its intend.
Open an inspector and play a bit with your image morph:
self scale: 1.5
self color: color red
self borderWidth: 5
self borderColor: Color black
--
http://mamot.fr/@drgeo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20250323/fa48d64c/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Lou8840OXS0mDtnK.png
Type: image/png
Size: 151858 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20250323/fa48d64c/attachment-0001.png>
More information about the Cuis-dev
mailing list