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

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
miki
Posts: 17
Joined: December 20th, 2004, 10:48 am
Location: London, UK
Contact:

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
calier
Posts: 13
Joined: January 18th, 2005, 1:45 pm

I recommand you add a "point control" effect to your layer and read the position of each corner of your layer from there.
vidpat
Posts: 86
Joined: October 21st, 2004, 12:36 am
Location: Phoenix, AZ
Contact:

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).
Post Reply