Tag Archives: rectangles

Solve the skyline problem in C#

In the “skyline problem” you are given a collection of rectangles all with a common baseline and the goal is to find an enveloping silhouette. The result looks like like the skyline for a city with a bunch of sky … Continue reading

Posted in algorithms, drawing, graphics, mathematics | Tagged , , , , , , , , , , , | Leave a comment

Draw rounded rectangles in C#

The GDI+ library provides lots of methods for drawing shapes such as rectangles, ellipses, lines, and arcs. Unfortunately it doesn’t provide a method for drawing rectangles with rounded corners. You can use a pen with LineJoin property set to Rounded … Continue reading

Posted in drawing, graphics | Tagged , , , , , , , , | 6 Comments