Back to FabImage Library website
You are here: Start » Function Reference » Region Spatial Transforms » RotateRegion

RotateRegion
Header: | FIL.h |
---|---|
Namespace: | fil |
Rotates a region around a point.
Syntax
C++
C#
void fil::RotateRegion ( const fil::Region& inRegion, ftl::Optional<const fil::Point2D&> inCenter, float inAngle, const bool inInverse, ftl::Optional<int> inFrameWidth, ftl::Optional<int> inFrameHeight, fil::Region& outRegion )
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 | ||
![]() |
inFrameWidth | Optional<int> | 0 - 65535 | NIL | Output region frame width |
![]() |
inFrameHeight | Optional<int> | 0 - 65535 | NIL | Output region frame height |
![]() |
outRegion | Region& | Output 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. |
See Also
- TranslateRegion – Translates a region by a given number of pixels along each axis.