You are here: Start » FIL.NET » Function Reference » Region » Region Relations » FIL.InscribeRegionInRegion
Shifts source region so that it is contained in target region.
Namespace: | FilNet |
---|---|
Assembly: | FIL.NET.dll |
Syntax
public static void InscribeRegionInRegion ( FilNet.Region inTargetRegion, FilNet.Region inSourceRegion, FilNet.ShiftType inPossibleShift, FilNet.FitType inFitType, out int? outShiftX, out int? outShiftY, INullable<FilNet.Region> outShiftedRegion )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() | inTargetRegion | FilNet.Region | Region to contain source region. | ||
![]() | inSourceRegion | FilNet.Region | Region to be shifted. | ||
![]() | inPossibleShift | FilNet.ShiftType | Possible directions of shift. | ||
![]() | inFitType | FilNet.FitType | Determines if the common border length should be maximized. | ||
![]() | outShiftX | int? | X coordinate of the shift. | ||
![]() | outShiftY | int? | Y coordinate of the shift. | ||
![]() | outShiftedRegion | FilNet.INullable<FilNet.Region> | Shifted source region. This parameter cannot be null. |
Description
The filter shifts inSourceRegion so that it is entirely contained in inTargetRegion. When inFitType is FirstFit, the function returns first shift. With inFitType set to BestFit, the function chooses from all possible shifts one that maximizes length of common border of target region and shifted source region. Parameter inPossibleShift defines directions in which source region should be shifted. Possible values are Any, Vertical, Horizontal.
All return values are conditional. In case appropriate shift exists, outShiftX and outShiftY define its coordinates. outShiftedRegion is inSourceRegion translated by vector (outShiftX,outShiftY) and with dimensions of inTargetRegion.
Examples
![]() |
![]() |
![]() |
InscribeRegionInRegion performed on pair of sample regions, shown on the left. Middle image shows inscribed region with inFitType set to FirstFit. Right one corresponds to inFitType equal BestFit.
Remarks
Setting parameter inFitType to BestFit results in much higher computational cost.
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Source region cannot be empty in InscribeRegionInRegion. |