DisplayFill2
from OpenCAD2D import DisplayFill2
class DisplayFill2(DisplayItem2) ยท DisplayFill2 in the .NET reference
A filled area: a hatch, a solid, a wipeout. Its rings are filled by the even-odd rule, so a ring inside another is a hole.
Constructors
__init__
def __init__(
self,
rings: System.Collections.Generic.IEnumerable[Sequence[float] | System.Array[float]],
isMask: bool,
style: DisplayStyle,
handle: str,
layer: str,
) -> None
Makes a fill.
Properties and fields
Bounds
@property
def Bounds(self) -> DisplayBox
Gets the box that holds the item.
IsMask
@property
def IsMask(self) -> bool
Gets whether the fill is a mask drawn in the background colour.
Rings
@property
def Rings(self) -> System.Collections.Generic.IReadOnlyList[System.Array[float]]
Gets the rings, each as X and Y in turn.
Methods
Contains
def Contains(self, x: float, y: float) -> bool
Gets whether a point is inside the fill by the even-odd rule.
DistanceTo
def DistanceTo(self, x: float, y: float) -> float
Gets the distance from a point to the item, the shortest to any part that is drawn; the distance to the nearest edge for a fill, nought inside it.
Touches
def Touches(self, box: DisplayBox) -> bool
Gets whether any part of the item touches a box, as a crossing selection asks.