Constructors

GH_GraphContainer

#
public GH_GraphContainer(IGH_Graph n_graph, double n_x0, double n_x1, double n_y0, double n_y1)
n_graph (IGH_Graph)
n_x0 (double)
n_x1 (double)
n_y0 (double)
n_y1 (double)

GH_GraphContainer

#
public GH_GraphContainer(IGH_Graph n_graph)
n_graph (IGH_Graph)

Fields

m_graphpath

#
protected GraphicsPath m_graphpath

Properties

DisplayScale

#
public float DisplayScale { get; set; }
Gets or sets the display scale for this graph.

Graph

#
public IGH_Graph Graph { get; set; }

LockGrips

#
public bool LockGrips { get; set; }

Region

#
public RectangleF Region { get; set; }

X0

#
public double X0 { get; set; }

X1

#
public double X1 { get; set; }

Y0

#
public double Y0 { get; set; }

Y1

#
public double Y1 { get; set; }

Methods

ClearCaches

#
public void ClearCaches()

Duplicate

#
public GH_GraphContainer Duplicate()

FromX

#
public double FromX(double t)
Remaps a domain value onto the unit-domain
t (double)The factor to remap

FromY

#
public double FromY(double t)
Remaps a domain value onto the unit-range
t (double)The factor to remap

Internal_Render_Graph

#
protected void Internal_Render_Graph(Graphics G)
G (Graphics)

Internal_Render_Grip

#
protected void Internal_Render_Grip(Graphics g, float x, float y)
g (Graphics)
x (float)
y (float)

Internal_Render_Grips

#
protected void Internal_Render_Grips(Graphics G)
G (Graphics)

Internal_Render_HorizontalConstraint

#
protected void Internal_Render_HorizontalConstraint(Graphics g, float y)
g (Graphics)
y (float)

Internal_Render_InvalidIcon

#
protected void Internal_Render_InvalidIcon(Graphics g)
g (Graphics)

Internal_Render_LockedIcon

#
protected void Internal_Render_LockedIcon(Graphics g)
g (Graphics)

Internal_Render_TagGDIObjects

#
protected void Internal_Render_TagGDIObjects(float zoom, ref SolidBrush bg_brush, ref SolidBrush fg_brush, ref Pen fg_pen)
zoom (float)
bg_brush (ref SolidBrush)
fg_brush (ref SolidBrush)
fg_pen (ref Pen)

Internal_Render_TagX

#
protected void Internal_Render_TagX(Graphics g, RectangleF graphrec, double r_a, double r_b)
g (Graphics)
graphrec (RectangleF)
r_a (double)
r_b (double)

Internal_Render_TagY

#
protected void Internal_Render_TagY(Graphics g, RectangleF graphrec, double r_a, double r_b)
g (Graphics)
graphrec (RectangleF)
r_a (double)
r_b (double)

Internal_Render_TextTag

#
protected void Internal_Render_TextTag(Graphics g, RectangleF graphrec, bool lowerright, string tag)
g (Graphics)
graphrec (RectangleF)
lowerright (bool)
tag (string)

Internal_Render_VerticalConstraint

#
protected void Internal_Render_VerticalConstraint(Graphics g, float x)
g (Graphics)
x (float)

NearestGrip

#
protected int NearestGrip(PointF pt, double max_search)
Returns the grip closest to the sample point.
pt (PointF)Point in graph region coordinates.
max_search (double)Maximum search radius in graph region units.
The index of the nearest grip, or -1 if no grip was found within the search radius.

OnGraphChanged

#
public void OnGraphChanged(bool bIntermediate)
bIntermediate (bool)

PrepareForUse

#
public void PrepareForUse()

Read

#
public bool Read(GH_IReader reader)
reader (GH_IReader)
Read

RemapPointsToGraphRegion

#
public void RemapPointsToGraphRegion(PointF[] pts)
pts (PointF[])

Render

#
public void Render(Graphics G, bool bIncludeDomainTags, List<double> samples)
G (Graphics)
bIncludeDomainTags (bool)
samples (List<double>)

Render_GraphBackground

#
public static void Render_GraphBackground(Graphics G, RectangleF region, bool bActive)
Renders the default Graph background.
G (Graphics)Graphics object to render with
region (RectangleF)The region of the graph.
bActive (bool)If true, a slightly less transparent background colour is used.

Render_GraphGrid

#
public static void Render_GraphGrid(Graphics G, RectangleF region)
Renders the default Grah grid. The default grid is a division od 10x10 cells along the graph region irregardless of domain ranges
G (Graphics)
region (RectangleF)

Render_GraphPen

#
public Pen Render_GraphPen()
Gets the default pen used to draw graph curves.

Render_GuidePen

#
public static Pen Render_GuidePen()
Gets the default pen used to draw grip guides. The default pen is Red with a 2.0f/2.0f dash pattern. This function returns a NEW instance of that pen, it is safe to dispose it.

Render_HorizontalConstraint

#
public static void Render_HorizontalConstraint(Graphics g, RectangleF rec, double t)
g (Graphics)
rec (RectangleF)
t (double)

Render_VerticalConstraint

#
public static void Render_VerticalConstraint(Graphics g, RectangleF rec, double t)
g (Graphics)
rec (RectangleF)
t (double)

RespondToKeyDown

#
public GH_ObjectResponse RespondToKeyDown(GH_Canvas sender, KeyEventArgs e)
sender (GH_Canvas)
e (KeyEventArgs)
RespondToKeyDown

RespondToKeyUp

#
public GH_ObjectResponse RespondToKeyUp(GH_Canvas sender, KeyEventArgs e)
sender (GH_Canvas)
e (KeyEventArgs)
RespondToKeyUp

RespondToMouseDoubleClick

#
public GH_ObjectResponse RespondToMouseDoubleClick(GH_Canvas sender, GH_CanvasMouseEvent e)
sender (GH_Canvas)
e (GH_CanvasMouseEvent)

RespondToMouseDown

#
public virtual GH_ObjectResponse RespondToMouseDown(GH_Canvas sender, GH_CanvasMouseEvent e)
sender (GH_Canvas)
e (GH_CanvasMouseEvent)
RespondToMouseDown

RespondToMouseMove

#
public virtual GH_ObjectResponse RespondToMouseMove(GH_Canvas sender, GH_CanvasMouseEvent e)
sender (GH_Canvas)
e (GH_CanvasMouseEvent)
RespondToMouseMove

RespondToMouseUp

#
public virtual GH_ObjectResponse RespondToMouseUp(GH_Canvas sender, GH_CanvasMouseEvent e)
sender (GH_Canvas)
e (GH_CanvasMouseEvent)
RespondToMouseUp

SolveGraphPath

#
protected GraphicsPath SolveGraphPath()

ToRegionBox

#
public PointF ToRegionBox(PointF pt)
Remap a point in Unit box coordinates onto the Region box
pt (PointF)Point to map

ToRegionBox_x

#
public float ToRegionBox_x(double x)
Remap an x coordinate from the unit domain onto the region x domain
x (double)

ToRegionBox_y

#
public float ToRegionBox_y(double y)
Remap an y coordinate from the unit domain onto the region y domain
y (double)

ToUnitBox

#
public PointF ToUnitBox(PointF pt)
Remap a point in Region coordinates onto the Unit box.
pt (PointF)Point to map

ToX

#
public double ToX(double t_unit)
Remaps a normalized value (0.0~1.0) onto the x-domain
t_unit (double)The normalized factor to remap

ToY

#
public double ToY(double t_unit)
Remaps a normalized value (0.0~1.0) onto the y-range
t_unit (double)The normalized value to remap

TryValueAt

#
public double TryValueAt(double t)
Attempts to evaluate a single parameter.
t (double)the parameter to evaluate
The solution, or NaN if an exception was thrown during solution.

ValueAt

#
public double ValueAt(double t)
Evaluates a single parameter.
t (double)the parameter to evaluate

Write

#
public bool Write(GH_IWriter writer)
writer (GH_IWriter)
Write

Events

GraphChanged

#
public event GH_GraphContainer.GraphChangedEventHandler GraphChanged
This event is raised whenever the underlying graph changes.