Copyied RectanglePacker class into Project.