Back to Aurora Vision Library website
You are here: Start » Function Reference » Region » Region Spatial Transforms » RotateRegion
RotateRegion
Header: | AVL.h |
---|---|
Namespace: | avl |
Module: | FoundationBasic |
Rotates a region around a specified point.
Syntax
C++
C#
void avl::RotateRegion ( const avl::Region& inRegion, atl::Optional<const avl::Point2D&> inCenter, float inAngle, const bool inInverse, avl::RotationSizeMode::Type inSizeMode, atl::Optional<int> inFrameWidth, atl::Optional<int> inFrameHeight, avl::Region& outRegion, atl::Optional<avl::CoordinateSystem2D&> outOutputAlignment = atl::NIL )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
inRegion | const Region& | Input region | |||
inCenter | Optional<const Point2D&> | NIL | Center of rotation | ||
inAngle | float | Clockwise rotation angle | |||
inInverse | const bool | Switches to counter-clockwise rotation | |||
inSizeMode | RotationSizeMode::Type | Preserve | Determines whether to extent the region size to fit the rotated region. | ||
inFrameWidth | Optional<int> | 0 - 65535 | NIL | Output region frame width, ignored when inSizeMode is set to RotationSizeMode::Fit. | |
inFrameHeight | Optional<int> | 0 - 65535 | NIL | Output region frame height, ignored when inSizeMode is set to RotationSizeMode::Fit. | |
outRegion | Region& | Output region | |||
outOutputAlignment | Optional<CoordinateSystem2D&> | NIL | Alignment of the output region |
Optional Outputs
The computation of following outputs can be switched off by passing value atl::NIL
to these parameters: outOutputAlignment.
Read more about Optional Outputs.
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
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Empty region on input when rotation center is Nil in RotateRegion. |
See Also
- TranslateRegion – Translates a region by a given number of pixels along each axis.