I’m building a timeline style interface to draw a motion curve between ‘keyframes’ with a polyline. My issue is that I want to limit the polyline to only be drawn within the window, and not outside of its own panel. Since the polyline needs the keyframes to know the direction and the curve, I don’t know how to draw just the part of the line up to the edge of the panel. Is there a trick to only draw it, or only make it visible, within a given rectangle?
I’ve considered using the z-axis and paneling over the bits that are visible in the wrong places but that doesn’t seem very elegant. Maybe there is some kind of inverse occlusion? Thanks!