GH_Border

References
public class GH_Border
Represents a resizing border of a Grasshopper canvas object.

Constructors

GH_Border

#
public GH_Border(RectangleF rectangle, GH_BorderTopology topology)
Create a new border.
rectangle (RectangleF)Shape of border.
topology (GH_BorderTopology)Border topology.

Properties

Region

#
public RectangleF Region { get; }
Gets the shape of the border.

Size_Cursor

#
public Cursor Size_Cursor { get; }
Gets the cursor associated with this border.

Topology

#
public GH_BorderTopology Topology { get; }
Gets the type of border.

Methods

Contains

#
public bool Contains(PointF pt)
Test a point for border inclusion.
pt (PointF)Point to test.
True if pt is inside or on this border.

CreateBorders

#
public static List<GH_Border> CreateBorders(RectangleF box, int borderLeft, int borderRight, int borderTop, int borderBottom)
Static (Shared) method for creating a set of borders.
box (RectangleF)Box for border creation.
borderLeft (int)Width of the leftmost border.
borderRight (int)Width of the rightmost border.
borderTop (int)Width of the topmost border.
borderBottom (int)Width of the bottommost border.
A list of borders.

CreateBorders

#
public static List<GH_Border> CreateBorders(RectangleF box, int borderSize)
Static (Shared) method for creating a set of borders.
box (RectangleF)Box for border creation.
borderSize (int)The width of all borders.
A list of borders.

CreateBorders

#
public static List<GH_Border> CreateBorders(RectangleF box, int borderWidth, int borderHeight)
Static (Shared) method for creating a set of borders.
box (RectangleF)Box for border creation.
borderWidth (int)The width of all vertical.
borderHeight (int)The height of all horizontal borders.
A list of borders.

CreateBorders

#
public static List<GH_Border> CreateBorders(RectangleF box, Padding padding)
Static (Shared) method for creating a set of borders.
box (RectangleF)Box for border creation.
padding (Padding)The size of the borders along all four edges.
A list of borders.