Fields
GripSize
#Gets or sets the base grip radius. Individual grip shapes add a small offset on top of this value (SolidDisc = +2, OpenDisc / SolidDiamond = +3, OpenDiamond = +4, arrows up to +7). Use MakeCompact() or MakeSpacious() to set both this and Thickness together.
ObscureDashPattern
#Dash pattern applied to graphs of de-emphasised (Rank.Obscure) functions. Set to null or an empty array to draw obscure functions with a solid stroke. The pattern is in pixel units (on, off, on, off, ...).
Thickness
#Gets or sets the base graph curve thickness. 3 is considered normal for the UI, but if you're exporting images or drawing into a small area you may want to adjust it. Use MakeCompact() or MakeSpacious() to set both this and GripSize together.
Properties
Background
#public Color Background { get; set; }
Background colour of the surface functions are drawn on. Used to resolve each function's FunctionUi.Tint into a concrete shade with adequate contrast. Defaults to white; set before rendering when drawing onto a differently-coloured surface.
Context
#Gets the graphics context for these function graphics. Note that the context may use an entirely different set of panning and zooming transforms than the graph view and thus nothing should be drawn using this context without first applying the graph transforms. We recommend only using the draw methods directly exposed by these FunctionGraphics rather than relying on Context.Graphics.
Methods
DrawAsymptote
#Draw a standard asymptote line.
DrawBox
#Draw a box around a point.
DrawBox
#Draw a box through two points.
DrawCircle
#Draw a circle around a point.
DrawCircle
#Draw a circle through two points.
DrawCross
#Draw an x-shaped grip.
DrawFlourish
#Draw a grip flourish.
Parameters:
| vector (VectorArgument) | |
| args (FunctionArguments) | |
| colour (Color) |
DrawGraph
#Draw a graph polyline.
Parameters:
| points (Point2d[]) | Points to draw. |
| edge (Color) | Graph colour. |
DrawGraphArea
#Draw an area graph.
DrawHorizontalAxis
#Draw a horizontal axis flourish through a point.
Parameters:
| point (Point2d) | Point. |
| edge (Color) | Colour of axis. |
DrawInfiniteLine
#Draw an infinite line through two points.
DrawLine
#Draw a finite line segment between points.
DrawLine
#Draw a finite line segment between points.
DrawOpenArrow
#Draw an arrow head grip with an edge.
DrawOpenDiamond
#Draw a diamond grip with an edge.
DrawOpenDisc
#Draw a circular grip with an edge.
DrawScalars
#Draw all scalars.
Parameters:
| args (FunctionArguments) | Collection of all scalars (required to find the parent of the scalar). |
| colour (Color) | Colour of scalar. |
DrawSolidArrow
#Draw an arrow head grip.
DrawSolidDiamond
#Draw a diamond grip.
DrawSolidDisc
#Draw a circular grip.
DrawVerticalAxis
#Draw a vertical axis flourish through a point.
Parameters:
| point (Point2d) | Point. |
| edge (Color) | Colour of axis. |
FlourishPen
#public Pen FlourishPen(Color colour)
Gets the edge used to draw flourishes. Called must dispose the edge when finished.
Parameters:
| colour (Color) | Colour. |
Returns: Flourish edge.
MakeCompact
#public void MakeCompact()
Set Thickness, GripSize and ObscureDashPattern to values suitable for small on-canvas drawings where graph area is at a premium.
MakeSpacious
#public void MakeSpacious()
Set Thickness, GripSize and ObscureDashPattern to values suitable for large drawings (the pop-out editor, exported images).