Page 1 of 1

Can you test if an image is "off screen"?

Posted: December 5th, 2005, 5:30 am
by miki
Hi all,

I'd like to be able to test whether a given image is at all visible within the comp area or not, judging from its transform attributes. I.e. "is it positioned completely off screen?"

This requires looking at the layer's position, anchor point, rotation, scale etc. (And if there's a mask on the layer, it's even more complicated! But we can ignore that case for the moment...)

Any ideas or tips on how to do this?
A function that would tell me the bounding box of the layer (in absolute coordinates) would be very helpful - if one exists!

Miki

Posted: January 16th, 2006, 12:50 pm
by calier
I recommand you add a "point control" effect to your layer and read the position of each corner of your layer from there.

Posted: January 17th, 2006, 12:09 am
by vidpat
It's been a while since I've looked at it, but I think you could use an expression or script in conjunction with the TextInfo plug-in I wrote (see Determining Width and Height of a Text Layer).

Despite its name, it should provide information (as wireable effect properties) about the visible portion of any layer (including rotation, masks, et cetera).