Table of Contents

DisplayClipRegion

from OpenCAD2D import DisplayClipRegion

class DisplayClipRegion(System.Object) ยท DisplayClipRegion in the .NET reference

The part of a clipped block reference that is shown (XCLIP): a ring in drawing units, and within another ring where the reference stands in a clipped block. Every item the reference draws carries it as DisplayItem2.BlockClip; the canvas draws the item inside the region alone, a pick finds it there, and a window or a crossing meets only the part of it there. A clip turned inside out is a ring that goes round the block's extents and in to the boundary by a slit, as AutoCAD keeps one, so that it is no different here.

Constructors

__init__

.NET

def __init__(self, outline: DisplayClip2, parent: DisplayClipRegion) -> None

Makes a region.

Properties and fields

Bounds

.NET

@property
def Bounds(self) -> DisplayBox

Gets the box that holds what is shown: the ring's box within its parent's; empty where the two do not meet.

Outline

.NET

@property
def Outline(self) -> DisplayClip2

Gets the ring of this reference's clip.

Parent

.NET

@property
def Parent(self) -> DisplayClipRegion | None

Gets the region of the clipped block this reference stands in; null for a reference of the space itself.

Ring

.NET

@property
def Ring(self) -> System.Array[float]

Gets the points of the ring as x, y pairs, the last not repeating the first.

Methods

Contains

.NET

def Contains(self, x: float, y: float) -> bool

Gets whether a point is in the region, inside its ring and its parent's; a point on an edge may fall either side.

Meets

.NET

def Meets(self, box: DisplayBox) -> bool

Gets whether the region meets a box: a vertex of the ring is in the box, a corner of the box is in the region, or an edge of the ring crosses the box; as a crossing selection, and the aperture of a snap, ask. Of nested rings the box is held to each in turn, which is a little more than is shown where the two cut one another.

Moved

.NET

def Moved(self, dx: float, dy: float) -> DisplayClipRegion

Gets a region moved along X and Y, as the reference's items are moved by a paste's preview.

Reaches

.NET

def Reaches(self, x: float, y: float, distance: float) -> bool

Gets whether a point is in the region or within a distance of it, as a pick asks for what lies under the pickbox: the point is inside every ring, or no farther than the distance from the edge of each it is outside.