Back to FabImage Library website
You are here: Start » Function Reference » Geometry 2D » Geometry 2D Spatial Transforms » ResizeRectangle_Relative
Header: | FIL.h |
---|---|
Namespace: | fil |
Module: | FoundationLite |
Changes dimensions of a rectangle relatively.
Syntax
C++
C#
void fil::ResizeRectangle_Relative ( const fil::Rectangle2D& inRectangle, fil::Anchor2D::Type inAnchor, float inWidthScale, float inHeightScale, fil::Rectangle2D& outRectangle )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() |
inRectangle | const Rectangle2D& | |||
![]() |
inAnchor | Anchor2D::Type | TopLeft | ||
![]() |
inWidthScale | float | 0.0 - ![]() |
1.0f | |
![]() |
inHeightScale | float | 0.0 - ![]() |
1.0f | |
![]() |
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.