Back to FabImage Library website

You are here: Start » Function Reference » Geometry 2D » Geometry 2D Spatial Transforms » TranslateSegment

TranslateSegment


Header: FIL.h
Namespace: fil
Module: FoundationLite

Translates a segment by a vector.

Syntax

C++
C#
 
void fil::TranslateSegment
(
	const fil::Segment2D& inSegment,
	const fil::Vector2D& inDelta,
	bool inInverse,
	const fil::TranslateAlignment::Type inDeltaAlignment,
	fil::Segment2D& outSegment
)

Parameters

Name Type Default Description
Input value inSegment const Segment2D&
Input value inDelta const Vector2D& Translation vector
Input value inInverse bool Switches to the inverse operation
Input value inDeltaAlignment const TranslateAlignment::Type
Output value 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

TranslateSegment performed on the sample segment, inDelta = (-60.0, -80.0) and inInverse = False.