Clipping a group by script

Craig Newman craig at starfirelighting.com
Fri Oct 11 12:24:04 EDT 2024


Bob.
I do not know why Klaus wants to truncate his groups, but I suspect it has nothing to do with fitting them onto the card.

Craig

> On Oct 11, 2024, at 11:44 AM, Bob Sneidar via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> Hmmm… I wrote a handler to determine the rect of all the visible objects on a card so I can set the stack rect to that plus margins. It involved getting the left, top, right and bottom as seperate values, of every visible object, then determining the min and max of each set of values as needed. You should be able to something similar. 
> 
> Bob S
> 
> 
>> On Oct 11, 2024, at 6:58 AM, Craig Newman via use-livecode <use-livecode at lists.runrev.com> wrote:
>> 
>> Klaus.
>> 
>> Answered in the forum:
>> 
>> Klaus.
>> 
>> If I make a group and set its height property to a value smaller than the original, the top of the group stays put, and the bottom is truncated, so that is half the battle. If I then play with the scroll of the group, I can control the visible portion.
>> 
>> Craig
>> 
>>> On Oct 11, 2024, at 6:17 AM, Klaus major-k via use-livecode <use-livecode at lists.runrev.com> wrote:
>>> 
>>> Hi friends,
>>> 
>>> I want to clip a group by script but cannot get it to work!?
>>> See this image, it shows what i want to achieve:
>>> <https://major-k.de/temp/group_clipping.png>
>>> 
>>> I want the content of the group to be clipped at the top and bottom.
>>> No problem when resizing manually but no dice by script so far.
>>> 
>>> I tried many variations of boundingrect, rect, clipstorect,
>>> lockloc, height and whatnot.
>>> 
>>> Any hints very welcome! :-)
>>> 
>>> 
>>> Best
>>> 
>>> Klaus
>>> 
>>> --
>>> Klaus Major
>>> https://www.major-k.de
>>> https://www.major-k.de/bass
>>> klaus at major-k.de
>>> 
>>> 
>>> _______________________________________________
>>> 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
>> 
>> _______________________________________________
>> 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
> 
> _______________________________________________
> 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