GH_Painter

References
public class GH_Painter
This class performs most of the drawing operations required for Grasshopper Canvas controls.

Constructors

GH_Painter

#
public GH_Painter(GH_Canvas owner)
Constructor.
owner (GH_Canvas)Canvas that owns this painter object.

Methods

ConnectionPath

#
public static GraphicsPath ConnectionPath(PointF pointA, PointF pointB, GH_WireDirection directionA, GH_WireDirection directionB)
pointA (PointF)
pointB (PointF)
directionA (GH_WireDirection)
directionB (GH_WireDirection)

ConnectionPathBezier

#
public static BezierF ConnectionPathBezier(PointF source, PointF target)
source (PointF)
target (PointF)

ConnectionVisible

#
public bool ConnectionVisible(PointF a, PointF b)
Test whether a wire ought to be drawn at all.
a (PointF)Start point of wire.
b (PointF)End point of wire.
True if the wire is visible and ought to be drawn.

DetermineWireType

#
public static GH_WireType DetermineWireType(IGH_Structure target)
Utility method for determining wire display types.
target (IGH_Structure)Pointer to transfer data.

DrawBackground

#
public void DrawBackground(GH_Viewport viewport)
viewport (GH_Viewport)

DrawConnection

#
public void DrawConnection(PointF pointA, PointF pointB, GH_WireDirection directionA, GH_WireDirection directionB, bool selectedA, bool selectedB, GH_WireType type)
pointA (PointF)
pointB (PointF)
directionA (GH_WireDirection)
directionB (GH_WireDirection)
selectedA (bool)
selectedB (bool)
type (GH_WireType)

DrawMiddleGround

#
public void DrawMiddleGround(GH_Document doc, GH_CanvasChannel channel)
doc (GH_Document)
channel (GH_CanvasChannel)

DrawNoDocumentMessage

#
public void DrawNoDocumentMessage()

DrawNULLBuffer

#
public void DrawNULLBuffer()

DrawPivots

#
public void DrawPivots(GH_Document doc)
doc (GH_Document)

DrawStateFlags

#
public void DrawStateFlags(GH_Document doc)
doc (GH_Document)

GenerateWirePen_Fill

#
public Brush GenerateWirePen_Fill(PointF a, PointF b, bool asel, bool bsel, bool empty)
a (PointF)
b (PointF)
asel (bool)
bsel (bool)
empty (bool)