You are here: Start » AVL.NET » AVL.RescaleRectangle Method

AVL.RescaleRectangle Method

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

Name Type Range Default Description
inRectangleAvlNet.Rectangle2D
inReferencePointAvlNet.Point2D?The point, to which all distance will be changed proportionally. Default value: atl::NIL, or null.
inScalefloat1.0fScaling factor. Default value: 1.0f.
inInverseboolSwitches to the inverse operation.
outRectangleAvlNet.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.

See also