Imagine NY downtown from far away, covered by smog. Skyscrapers have no longer the original color. It is difficult to tell where one ends and another begins. There is only an edgy silhouette that looks like merged rectangles.
The challenge is to take all the coordinates of stand alone skyscrapers and to merge them into one huge silhouette.
During the 'Programming 2' course we worked with JavaFX to create graphical apps. JavaFX replaced out of date AWT and Swing libraries. My aim was to try them out and see the differences.
There is a drawing space and a little control panel on the right side. The control panel has a merge check box, two radio buttons for color and a clear button. By default merge is activated.
By moving the mouse with a pressed button will set edge coordinates for a skyscraper. With merge enabled only silhouettes will appear. With merge disabled a color for every shaped building can be chosen. New buildings will appear in the foreground covering existing ones. Then if the merge is checked out all skyscrapers will be forged into one shape.
Clear the drawing space with the according button.
Tested with a display resolution 1680x1050 pixels.
- clone the repository
- go to out/artifacts/Skyline_jar
- open Skyline.jar