Back to FabImage Library website
You are here: Start » Function Reference » Path Features » PathBoundingRectangle_Deprecated

PathBoundingRectangle_Deprecated
Header: | FIL.h |
---|---|
Namespace: | fil |
Computes the smallest rectangle (can be rotated) containing a path.
Syntax
C++
void fil::PathBoundingRectangle_Deprecated ( const fil::Path& inPath, ftl::Optional<float> inRectangleOrientation, fil::BoundingRectangleFeature::Type inBoundingRectangleFeature, fil::Rectangle2D& outBoundingRectangle, ftl::Optional<fil::Point2D&> outCenter = ftl::NIL, ftl::Optional<float&> outLongSide = ftl::NIL, ftl::Optional<float&> outShortSide = ftl::NIL )
Parameters
Name | Type | Default | Description | |
---|---|---|---|---|
![]() |
inPath | const Path& | Input array of points | |
![]() |
inRectangleOrientation | Optional<float> | NIL | Expected orientation of the resulting rectangle |
![]() |
inBoundingRectangleFeature | BoundingRectangleFeature::Type | MinimalArea | Determines what kind of bounding rectangle will be computed |
![]() |
outBoundingRectangle | Rectangle2D& | The smallest bounding rectangle of the input path | |
![]() |
outCenter | Optional<Point2D&> | NIL | Center of the bounding rectangle |
![]() |
outLongSide | Optional<float&> | NIL | Length of the bounding rectangle long side |
![]() |
outShortSide | Optional<float&> | NIL | Length of the bounding rectangle short side |
Optional Outputs
The computation of following outputs can be switched off by passing value ftl::NIL
to these parameters: outCenter, outLongSide, outShortSide.
Read more about Optional Outputs.
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Empty path on input in PathBoundingRectangle_Deprecated. |