You are here: Start » AVL.NET » AVL.RescaleRectangle(AvlNet.Rectangle2D, AvlNet.Point2D?, float, bool, AvlNet.Rectangle2D)
AVL.RescaleRectangle(AvlNet.Rectangle2D, AvlNet.Point2D?, float, bool, AvlNet.Rectangle2D)
Changes the corners and the dimensions of a rectangle.
| Namespace: | AvlNet |
|---|---|
| Assembly: | AVL.NET.dll |
Syntax
public static void RescaleRectangle( AvlNet.Rectangle2D inRectangle, AvlNet.Point2D? inReferencePoint, float inScale, bool inInverse, out AvlNet.Rectangle2D outRectangle )
Parameters
- inRectangle
- Type: AvlNet.Rectangle2D
- inReferencePoint
- Type: System.Nullable<AvlNet.Point2D>
The point, to which all distance will be changed proportionally, or null. - inScale
- Type: System.Single
Scaling factor - inInverse
- Type: System.Boolean
Switches to the inverse operation - outRectangle
- Type: AvlNet.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. |


