Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Class: RT.Coordinates.SvgInstructions

Summary

Contains instructions to control the behavior of Structure<TCell>.Svg(SvgInstructions).

Constructors

Creates a new instance of SvgInstructions.

Static methods

string
DrawBridge(PointD center1, PointD center2, Func<double, string> r)
Provides a default implementation for SvgInstructions.BridgeSvg.

Instance methods

string
Round(double value)
Rounds a floating-point value to a number of decimal places specified by SvgInstructions.Precision. Useful to pass into methods such as GridUtils.SvgEdgesPath(IEnumerable<Link<Vertex>>, Func<Vertex, PointD>, Func<double, string>).

Instance fields

Func<object, object, string, string> Generates SVG code for a bridge — a connection between cells that have no edges in common. The first two parameters are the cells; the third is a default SVG path d attribute that can optionally be used.
stringProvides some additional SVG code to add at the start of the file.
string Provides some additional SVG code to add into the file after the cell highlights (SvgInstructions.HighlightCells) but before the main grid.
string Provides some additional SVG code to add into the file after the main grid but before SvgInstructions.PerCellAfter.
stringProvides some additional SVG code to add at the end of the file.
Func<object, PointD?> Returns the center point for the specified cell. If this is absent or returns null, the cell must implement IHasSvgGeometry.
Func<object, IEnumerable<Link<Vertex>>> Returns a collection of edges (line segments) that make up the perimeter of the specified cell. If this is absent or returns null, the cell must implement IHasSvgGeometry.
Func<Link<Vertex>, IList, EdgeInfo<object>> Returns the type of edge to draw in SVG for a particular pair of vertices. The second parameter receives a list of the cells that share the edge; this will be of runtime type System.Collections.Generic.List<TCell>, where TCell is the generic type argument used on Structure<TCell>. (see also remarks)
Func<Vertex, PointD>Returns the 2D point for the specified vertex.
object Paints some cells with a background color. (see also remarks)
SvgColorSpecifies a default color used when highlighting cells specified by SvgInstructions.HighlightCells.
Func<string, string> Generates the SVG path object for the structure’s outline (perimeter), assuming SvgInstructions.OutlineSeparate is false. The function is invoked once only. The function parameter is the path’s d attribute, describing the entirety of the outline of the structure.
Func<string, object, string> Generates SVG path objects for each segment of the outline (perimeter), assuming SvgInstructions.OutlineSeparate is true. The function is invoked once for each separate edge along the perimeter. The first function parameter is the path’s d attribute. The second parameter is the cell the edge belongs to.
bool If true, SvgInstructions.OutlinePaths is used to render each edge of the outline (perimeter) separately. Otherwise, SvgInstructions.OutlinePath is used to render the entire outline as a single SVG path.
Func<string, string> Generates the SVG path object for passable edges between cells, assuming SvgInstructions.PassagesSeparate is false. The function is invoked once only. The function parameter is the path’s d attribute, describing the entirety of all passages in the structure.
Func<string, object, object, string> Generates SVG path objects for passable edges between cells, assuming SvgInstructions.PassagesSeparate is true. The function is invoked once for each separate passable edge. The first function parameter is the path’s d attribute. The remaining parameters are the two cells connected by the passage, in no particular order.
bool If true, SvgInstructions.PassagesPaths is used to render each passable edge separately. Otherwise, SvgInstructions.PassagesPath is used to render all passable edges as a single SVG path.
Func<object, string>Adds extra SVG code for every cell after the SVG for the outline and walls.
Func<object, string>Adds extra SVG code for every cell before the SVG for the outline and walls.
int?Specifies a number of decimal places to round every coordinate to when generating SVG paths.
string Specifies the attributes on the main <svg> tag. Set this to null to omit the SVG tag entirely.
Func<string, string> Generates the SVG path object for impassable edges (walls) between cells, assuming SvgInstructions.WallsSeparate is false. The function is invoked once only. The function parameter is the path’s d attribute, describing the entirety of all walls in the structure.
Func<string, object, object, string> Generates SVG path objects for impassable edges (walls) between cells, assuming SvgInstructions.WallsSeparate is true. The function is invoked once for each separate impassable edge (wall). The first function parameter is the path’s d attribute. The remaining parameters are the two cells on either side of the wall, in no particular order.
bool If true, SvgInstructions.WallsPaths is used to render each impassable edge (wall) separately. Otherwise, SvgInstructions.WallsPath is used to render all impassable edges (walls) as a single SVG path.