Back to FabImage Library website

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

RescaleLine


Header: FIL.h
Namespace: fil
Module: FoundationLite

Changes the distance of a line to a reference point.

Syntax

C++
C#
 
void fil::RescaleLine
(
	const fil::Line2D& inLine,
	const fil::Point2D& inReferencePoint,
	float inScale,
	bool inInverse,
	fil::Line2D& outLine
)

Parameters

Name Type Default Description
Input value inLine const Line2D&
Input value inReferencePoint const Point2D& The point to which all distances change linearly
Input value inScale float 1.0f Scaling factor
Input value inInverse bool Switches to the inverse operation
Output value outLine Line2D&

In-place Processing

This function supports in-place data processing - you can pass the same reference to inLine and outLine

Read more about In-place Computation.

Errors

List of possible exceptions:

Error type Description
DomainError Indefinite line on input in RescaleLine.
DomainError Scale cannot be zero in an inverse rescaling of a line in RescaleLine.