How to calculate visible gui elements within a scrolling frame?

The title is pretty self explanatory. I need a way to calculate what gui elements are visible on a scrolling frame and which are off screen.
One way I’ve tried to do this is by looping each child of the scrolling frame and comparing it’s position of the scrolling frame’s canvas position. However, I’m not exactly sure how to compare those two in a way to achieve my goal.

I’d recommend comparing AbsolutePosition and AbsoluteSize between them. If the UI element’s AbsolutePosition is greater than the AbsoluteSize + AbsolutePosition of the ScrollingFrame, then it isn’t visible. If the AbsolutePosition + AbsoluteSize of the element is less than the AbsolutePosition of the ScrollingFrame, then it is also not visible.