You are here: Start » AVL.NET » Function Reference » Region » Region Spatial Transforms » AVL.RotateRegion

AVL.RotateRegion

Rotates a region around a specified point.

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax

C++
C#
 
public static void RotateRegion
(
	AvlNet.Region inRegion,
	AvlNet.Point2D? inCenter,
	float inAngle,
	bool inInverse,
	AvlNet.RotationSizeMode inSizeMode,
	int? inFrameWidth,
	int? inFrameHeight,
	AvlNet.Region outRegion
)

Parameters

Name Type Range Default Description
inRegionAvlNet.RegionInput region.
inCenterAvlNet.Point2D?Center of rotation. Default value: atl::NIL.
inAnglefloatClockwise rotation angle.
inInverseboolSwitches to counter-clockwise rotation.
inSizeModeAvlNet.RotationSizeModePreserveDetermines whether to extent the region size to fit the rotated region. Default value: Preserve.
inFrameWidthint?<0, 65535>Output region frame width, ignored when inSizeMode is set to RotationSizeMode::Fit. Default value: atl::NIL.
inFrameHeightint?<0, 65535>Output region frame height, ignored when inSizeMode is set to RotationSizeMode::Fit. Default value: atl::NIL.
outRegionAvlNet.RegionOutput region.

Description

The operation rotates a region by the inAngle degrees around inCenter point. If the inCenter is not provided, the rotation is conducted around the mass center of the region.

Examples

RotateRegion performed on the sample region with inAngle set to 45.

Errors

List of possible exceptions:

Error type Description
DomainError Empty region on input when rotation center is Nil in RotateRegion.

Function Overrides

See also