Back to FabImage Library website

You are here: Start » Function Reference » Basic » Box » ResizeBox

ResizeBox


Header: FIL.h
Namespace: fil
Module: FoundationLite

Changes the dimensions of a box.

Syntax

C++
C#
 
void fil::ResizeBox
(
	const fil::Box& inBox,
	fil::Anchor2D::Type inAnchor,
	ftl::Optional<int> inNewWidth,
	ftl::Optional<int> inNewHeight,
	fil::Box& outBox
)

Parameters

Name Type Range Default Description
Input value
inBox const Box& Input box
Input value
inAnchor Anchor2D::Type TopLeft Point of the box which position will not change
Input value
inNewWidth Optional<int> 0 - NIL Target width of the box
Input value
inNewHeight Optional<int> 0 - NIL Target height of the box
Output value
outBox Box& Resized box

In-place Processing

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

Read more about In-place Computation.

Description

The operation changes dimensions of input Box to (inNewWidth, inNewHeight).

See Also

  • ResizeRegion – Enlarges or shrinks a region to new dimensions.