Nicola,
This command will rescale the polygonMorph. I am not sure how it is used in your example.
1. Run your sample code and create the rectangle.2. Use the Halo to resize the parent and make sure to maintain the aspect ratio3. Launch Explore from the Halo.4. Find the polygon submorph and select it.5. In the code space at the bottom of the Explorer do "self bounds: self owner bounds"
Probably not much help, but perhaps a hint to something that will.
-jrm
On Tue, Jul 30, 2019 at 12:43 AM Nicola Mingotti <nmingotti@gmail.com> wrote:
Hi,
Considering this short snippet:
-------------------
"Prepare the rectangle containing the drawing."
r := RectangleMorph new.
r extent: 500@500.
r openInWindow.
p := PolygonMorph
vertices: {(r left)@(r top). (r right)@(r bottom)}
color: Color white borderWidth: 2 borderColor: Color white.
r addMorph: p.
--------------------
1] I see that the PolygonMorph 'p' translates with its father the RectangleMorph 'r'. Ok, as expected.
2] If I rescale 'r' with the Halo yellow button, 'p' is not rescaled and the effect is unexpected.
How can I make 'p' rescale with its father ?
bye
Nicola
_______________________________________________
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners
_______________________________________________ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners