Back to FabImage Library website
You are here: Start » Function Reference » Region » Region Basics » SetRegionFrame
Header: | FIL.h |
---|---|
Namespace: | fil |
Module: | FoundationLite |
Changes the width and the height of a region's frame (but does not rescale the content).
Syntax
C++
C#
void fil::SetRegionFrame ( fil::Region& ioRegion, int inWidth, int inHeight )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() |
ioRegion | Region& | |||
![]() |
inWidth | int | 0 - 65535 | New frame width | |
![]() |
inHeight | int | 0 - 65535 | New frame height |
Description
The operation sets the region frame's width and height to new values, while it does not change the location of any of the region pixels. Note that all of the region pixels have to be contained within region frame's dimensions. If this is not the case with selected dimensions, an error with appropriate description occurs.
Examples
![]() |
![]() |
SetRegionFrame used to change dimensions from 150x150 to 300x300.
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Resulting region isn't contained in new dimensions in SetRegionFrame. |
See Also
- CropRegion – Creates a region from a rectangular fragment of another one.