Back to Aurora Vision Library website

You are here: Start » Function Reference » Geometry 2D » Geometry 2D Spatial Transforms » RescaleRectangle


Header: AVL.h
Namespace: avl
Module: FoundationLite

Changes the corners and the dimensions of a rectangle.


void avl::RescaleRectangle
	const avl::Rectangle2D& inRectangle,
	atl::Optional<const avl::Point2D&> inReferencePoint,
	float inScale,
	bool inInverse,
	avl::Rectangle2D& outRectangle


Name Type Default Description
Input value
inRectangle const Rectangle2D&
Input value
inReferencePoint Optional<const Point2D&> NIL The point, to which all distance will be changed proportionally
Input value
inScale float 1.0f Scaling factor
Input value
inInverse bool Switches to the inverse operation
Output value
outRectangle Rectangle2D&

In-place Processing

This function supports in-place data processing - you can pass the same reference to inRectangle and outRectangle

Read more about In-place Computation.


RescaleRectangle performed on the sample rectangle, inReferencePoint = (0.0, 0.0), inScale = 2.0 and inInverse = false.


List of possible exceptions:

Error type Description
DomainError Scale cannot be zero in inverse scaling of rectangle in RescaleRectangle.