Back to FabImage Library Lite websiteYou are here:
Start »
Geometry 2D »
Geometry 2D Spatial Transforms »
RescaleCircle
Header: |
FIL.h
|
Namespace: |
fil |
Changes radius of a circle and translates its center in relation to a reference point.
Syntax
void fil::RescaleCircle
(
const fil::Circle2D& inCircle,
ftl::Optional<const fil::Point2D&> inReferencePoint,
float inScale,
bool inInverse,
fil::Circle2D& outCircle
)
Parameters
|
Name |
Type |
Default |
Description |
 |
inCircle |
const Circle2D& |
|
|
 |
inReferencePoint |
Optional<const Point2D&> |
NIL |
The point to which the distance of the circle center is changed (no change by default) |
 |
inScale |
float |
1.0f |
Scaling factor |
 |
inInverse |
bool |
|
Switches to the inverse operation |
 |
outCircle |
Circle2D& |
|
|
In-place Processing
This function supports in-place data processing - you can pass the same reference to inCircle and outCircle
Read more about In-place Computation.
Examples
RescaleCircle performed on the sample circle, inReferencePoint = auto, inScale = 0.5 and inInverse = false.
Errors
List of possible exceptions:
Error type |
Description |
DomainError |
Scale cannot be zero in an inverse rescaling of a circle in RescaleCircle. |