fit

Scales uniformly an element so that it fits in a given rectangle. No scaling is applied if the element is already small enough to fit in the rectangle.

Parameters

element Element

The drawing element that should be fitted.

rect Rect

The rectangle in which the elements should be fitted.