Back to Aurora Vision Library Lite website

You are here: Start » Geometry 2D » Geometry 2D Spatial Transforms » ResizeRectangle_Relative

ResizeRectangle_Relative


Header: AVL.h
Namespace: avl

Changes dimensions of a rectangle relatively.

Syntax

void avl::ResizeRectangle_Relative
(
	const avl::Rectangle2D& inRectangle,
	avl::Anchor2D::Type inAnchor,
	float inWidthScale,
	float inHeightScale,
	avl::Rectangle2D& outRectangle
)

Parameters

Name Type Range Default Description
Input value inRectangle const Rectangle2D&
Input value inAnchor Anchor2D::Type TopLeft
Input value inWidthScale float 0.0 - 1.0f
Input value inHeightScale float 0.0 - 1.0f
Output value outRectangle Rectangle2D&

In-place Processing

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

Read more about In-place Computation.

Examples

ResizeRectangle_Relative performed on the sample rectangle, inWidthScale = 2.0 and inHeightScale = 0.5.