Skip to content

Rect class usability improvements

Rafał Siejakowski requested to merge S-Rafael/lib2geom:rect-shrink into master

The class GenericRect is enhanced with the member function shrinkBy() (with two overloads mirroring those of expandBy()), but with opposite meaning – they reduce the size of the rectangle by shaving off a "margin" of specified thickness along its perimeter.

The derived class Rect is enhanced with member functions expandedBy() and shrunkBy(). These functions are analogous to expandBy() and shrinkBy() but they return a new Rect instead of modifying the current object in place.

Merge request reports