GH_DocDiagramPainter

References
This class paints diagrammatic images of a collection of objects.

Properties

BoundingBox

#
public RectangleF BoundingBox { get; }
Gets the 2D domain of the diagram in canvas coordinates.

DrawingBox

#
public Rectangle DrawingBox { get; }
Gets the 2D domain of the diagram in image coordinates.

IgnoreSelectedStates

#
public bool IgnoreSelectedStates { get; set; }
Gets or sets the Ignore Selected State flag. When set to True, selected objects are not drawn in a different colour.

Image

#
public Bitmap Image { get; }
Gets the diagram image (only available after a call to PaintDiagram().

Size

#
public Size Size { get; }
Gets the width and height (in pixels) of this diagram image.

Zoom

#
public float Zoom { get; }
Gets the zoom factor for this diagram.

Methods

MapPoint

#
public Point MapPoint(Point pt)
pt (Point)

MapPoint

#
public PointF MapPoint(PointF pt)
pt (PointF)

MapRectangle

#
public Rectangle MapRectangle(Rectangle rec)
rec (Rectangle)

MapX

#
public float MapX(float x)
x (float)

MapX

#
public int MapX(int x)
x (int)

MapY

#
public float MapY(float y)
y (float)

MapY

#
public int MapY(int y)
y (int)

PaintDiagram

#
public bool PaintDiagram(IEnumerable<IGH_DocumentObject> objs, int approx_size, int inflate)
Paint a diagram of a document.
objs (IEnumerable<IGH_DocumentObject>)Objects to paint.
approx_size (int)Approximate size along each side.
inflate (int)Padding around the objects.
True on success, false on failure.

PaintDiagram

#
public bool PaintDiagram(IEnumerable<IGH_DocumentObject> objs, int mapWidth, int mapHeight, int inflate)
Paint a diagram of a document.
objs (IEnumerable<IGH_DocumentObject>)Objects to paint.
mapWidth (int)Width (in pixels) of diagram.
mapHeight (int)Height (in pixels) of diagram.
inflate (int)Padding around the objects.
True on success, false on failure.

UnmapPoint

#
public Point UnmapPoint(Point pt)
pt (Point)

UnmapRectangle

#
public Rectangle UnmapRectangle(Rectangle rec)
rec (Rectangle)

UnmapX

#
public int UnmapX(int x)
x (int)

UnmapY

#
public int UnmapY(int y)
y (int)