Back to Adaptive Vision Library website

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

RescaleRectangle


Changes the corners and the dimensions of a rectangle.

Syntax

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

Parameters

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

Examples

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

Errors

Error type Description
DomainError inScale cannot be zero in inverse operation in RescaleRectangle.