Back to FabImage Library website
You are here: Start » Function Reference » Path » Polygon Relations » TestPolygonInPolygon

TestPolygonInPolygon
Header: | FIL.h |
---|---|
Namespace: | fil |
Module: | FoundationBasic |
Tests whether a polygon lies inside another one.
Syntax
C++
C#
void fil::TestPolygonInPolygon ( const fil::Path& inSubPolygon, const fil::Path& inPolygon, bool& outIsContained )
Parameters
Name | Type | Default | Description | |
---|---|---|---|---|
![]() |
inSubPolygon | const Path& | Polygon the position of which will be tested | |
![]() |
inPolygon | const Path& | Polygon against which the position will be tested | |
![]() |
outIsContained | bool& | True if whole polygon lies inside the other one, false otherwise |
Description
The operation tests if inSubPolygon lies (in its entirety) inside inPolygon.
Due to inaccuracy of floating point representation a point lying extremely close to a path may considered to be on either of the sides of the path or exactly on the path itself.
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Empty path on input (inSubPolygon) in TestPolygonInPolygon. |
DomainError | Open path on input in TestPolygonInPolygon. |
See Also
- TestPointInPolygon – Tests whether a point lies inside a polygon.