CompletelyWithin
Namespace: Digi21.DigiNG.Entities.Relations
Assembly: Digi21.DigiNG
Indicates whether the first area is completely inside the second, without common vertices.

public static bool CompletelyWithin(ReadOnlyLine a, ReadOnlyLine b)
public static bool CompletelyWithin(ReadOnlyLine a, ReadOnlyPolygon b)
public static bool CompletelyWithin(ReadOnlyPolygon a, ReadOnlyLine b)
public static bool CompletelyWithin(ReadOnlyPolygon a, ReadOnlyPolygon b)
| Parameter | Description |
|---|---|
a |
Area to test for containment in b: a closed ReadOnlyLine or a ReadOnlyPolygon. |
b |
Containing area. |
Return value
true if all four conditions are met:
- No vertex of
ais outsideb. A vertex inside a hole ofbis outsideb. - At least one vertex of
ais insideb. Vertices ofalying on an edge ofbare ignored. - No vertex of
acoincides with a vertex ofb. - No vertex of
b, including holes, is insidea.
If a is inside b with any common vertex, this method returns false and Within(a, b) returns true. The method is asymmetric: to find whether b is completely inside a, call CompletelyWithin(b, a).
Exceptions
| Exception | When |
|---|---|
ArgumentNullException |
a or b is null. |
SEHException |
An area has an unclosed ring, a ring with zero area or a spike. See AreaArea exceptions. |
Example
See the AreaArea example.