Back to FabImage Library website
You are here: Start » Function Reference » Geometry 2D » Geometry 2D Spatial Transforms » ResizeSegment
Header: | FIL.h |
---|---|
Namespace: | fil |
Module: | FoundationLite |
Lengthens or shortens a segment to a new length preserving its orientation and center point.
Syntax
C++
C#
void fil::ResizeSegment ( const fil::Segment2D& inSegment, float inNewLength, float inAnchor, fil::Segment2D& outSegment )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() |
inSegment | const Segment2D& | |||
![]() |
inNewLength | float | 0.0 - ![]() |
1.0f | |
![]() |
inAnchor | float | -![]() ![]() |
0.5f | |
![]() |
outSegment | Segment2D& |
In-place Processing
This function supports in-place data processing - you can pass the same reference to inSegment and outSegment
Read more about In-place Computation.
Examples
![]() |
![]() |
ResizeSegment performed on the sample segment, inNewLength = 298.0.