Resizing a group to clip an object symetrically
Scott Rossi
scott at tactilemedia.com
Thu Dec 12 18:53:22 EST 2013
Hi Terry:
This works if the group is locked and requires grabbing the loc of the
oval.
command cropGraphic pPercent
put height of grc "oval" div 2 into H
put loc of grc "oval" into theLoc
put item 2 of theLoc into Y
put rect of grp 1 into theRect
put Y - (pPercent/100)*H into item 2 of theRect
put Y + (pPercent/100)*H into item 4 of theRect
set rect of grp 1 to theRect
set loc of grc 1 to theLoc
end cropGraphic
Regards,
Scott Rossi
Creative Director
Tactile Media, UX/UI Design
On 12/12/13 2:52 PM, "Terry Judd" <terry.judd at unimelb.edu.au> wrote:
>I have a group that contains a single round graphic object. The group is
>narrower than the graphic so that only a segment of the disc is
>displayed. I now want to animate a reduction in the height of the group
>so that the disc is clipped symetrically at the top and the bottom.
>Setting the height or the rect of the group doesn't seem to work as the
>group only gets resized from the bottom. What am I missing?
>
>Terry...
>
>Dr Terry Judd
>Senior Lecturer in Medical Education
>Medical Education Unit
>Faculty of Medicine, Dentistry & Health Sciences
>The University of Melbourne
>
>
>
>
>_______________________________________________
>use-livecode mailing list
>use-livecode at lists.runrev.com
>Please visit this url to subscribe, unsubscribe and manage your
>subscription preferences:
>http://lists.runrev.com/mailman/listinfo/use-livecode
>
More information about the use-livecode
mailing list