How to check, if QT has corrupted stack title
Bill Marriott
wjm at wjm.org
Thu Mar 12 10:44:15 EDT 2009
Tiemo ,
> I think on Win it won't work, because the title is left
> aligned, so comparing the left and right rect would always be false.
I wrote this on Win... do you mean Mac, which is center-aligned? Either way,
it's the only approach I can think of. You just have to check the proper
region, adjusting the offsets depending on the OS.
> function mungedTitleBar
> put the rect of this stack into myRect -- left,top,right,bottom
>
> put myRect into leftRect
> add 40 to item 1 of leftRect
> subtract 20 from item 2 of leftRect
> put item 1 of leftRect + 20 into item 3 of leftRect
> put item 2 of leftRect + 10 into item 4 of leftRect
>
> put leftRect into rightRect
> put item 3 of myRect - 90 into item 1 of rightRect
> put item 3 of myRect - 70 into item 3 of rightRect
>
> export snapshot from rect leftRect to foobarL as PNG
> export snapshot from rect rightRect to foobarR as PNG
>
> return foobarL = foobarR
> end mungedTitleBar
More information about the use-livecode
mailing list