Back to FabImage Library Lite website
You are here: Start » Geometry 2D Spatial Transforms » RescaleSegment
RescaleSegment
Lengthens or shortens a segment relatively.
Syntax
void fil::RescaleSegment ( const fil::Segment2D& inSegment, ftl::Optional<const fil::Point2D&> inReferencePoint, float inScale, bool inInverse, fil::Segment2D& outSegment )
Parameters
| Name | Type | Default | Description | |
|---|---|---|---|---|
![]() |
inSegment | const Segment2D& | ||
![]() |
inReferencePoint | Optional<const Point2D&> | NIL | The point to which all distances change linearly (the mass center by default) |
![]() |
inScale | float | 1.0f | Scaling factor (negative values invert the segment) |
![]() |
inInverse | bool | Switches to the inverse operation | |
![]() |
outSegment | Segment2D& |
Examples
![]() |
![]() |
RescaleSegment performed on the sample segment, inReferencePoint = auto, inScale = 2.0 and inInverse = false.




