Will a clipped long path take longer time to display than a short unclipped?


#1

If I create a Path to show an automation curve for a complete piece of music but only want to display a short bit with graphics::strokePath(), should I create a new Path for just that bit (as to my knowledge you can’t split Paths) or will the graphics context itself optimize to not waste time with the parts of the Path laying outside the clipped region?


#2

The graphics context will certainly clip it, but it’s a vastly more expensive operation to draw part of a huge path than to just generate a smaller one to begin with.


#3

Well, I was merely thinking that the context perhaps just iterated past the parts of the path that was outside the clipping region and spend time just with the parts laying inside the region, but thinking it over again I realized that a path can look like virtually anything so there wont be an easy way to scan through the parts outside the clipping region. Will have to rethink my automation slightly…