Given any number of intersection, disjoint and touching rectangles, how to find the (multiple) outline polylines? Rectangles are defined in pixel coordinates so they have integer accuracy, but they may be thousands of units large.
I really need numeric coordinates for the outlines, merging GDI regions won't do. I know I can simplify the problem by creating a GDI region and calling GetRegionScans, but it still won't solve the problem.
This is part of real-time UI, so the algorithm needs to be reasonably fast (I'm guessing never more than a dozen or so boxes, maybe a hundred).
I'm doing this in C#, but since this is an algorithmic question I don't really care about language. Any ideas most welcome.