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.
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& |
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.
Examples
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Scale cannot be zero in inverse scaling of rectangle in RescaleRectangle. |