Satsuma
a delicious .NET graph library
|
Draws a graph on a Graphics. More...
Public Member Functions | |
void | Draw (Graphics graphics, Matrix matrix=null) |
Draws the graph. More... | |
void | Draw (Graphics graphics, RectangleF box) |
Draws the graph to fit the given bounding box. More... | |
Bitmap | Draw (int width, int height, Color backColor, bool antialias=true, PixelFormat pixelFormat=PixelFormat.Format32bppArgb) |
Draws the graph to a new bitmap and returns the bitmap. More... | |
GraphDrawer () | |
Properties | |
Func< Arc, Pen > | ArcPen [get, set] |
Assigns a pen to each arc. More... | |
Pen | DirectedPen [get, set] |
The pen used for directed arcs. More... | |
IGraph | Graph [get, set] |
The graph to draw. More... | |
Func< Node, string > | NodeCaption [get, set] |
Assigns its caption to a node. More... | |
Func< Node, PointF > | NodePosition [get, set] |
Assigns its position to a node. More... | |
Func< Node, NodeStyle > | NodeStyle [get, set] |
Assigns its style to a node. More... | |
Pen | UndirectedPen [get, set] |
The pen used for undirected arcs. More... | |
Draws a graph on a Graphics.
Example:
Definition at line 195 of file Drawing.cs.
Satsuma.Drawing.GraphDrawer.GraphDrawer | ( | ) |
Definition at line 222 of file Drawing.cs.
void Satsuma.Drawing.GraphDrawer.Draw | ( | Graphics | graphics, |
Matrix | matrix = null |
||
) |
Draws the graph.
matrix | The transformation matrix to be applied to the node positions (but not to the node and arc shapes). If null, the identity matrix is used. |
Definition at line 236 of file Drawing.cs.
void Satsuma.Drawing.GraphDrawer.Draw | ( | Graphics | graphics, |
RectangleF | box | ||
) |
Draws the graph to fit the given bounding box.
box | The desired bounding box for the drawn graph. |
Definition at line 270 of file Drawing.cs.
Bitmap Satsuma.Drawing.GraphDrawer.Draw | ( | int | width, |
int | height, | ||
Color | backColor, | ||
bool | antialias = true , |
||
PixelFormat | pixelFormat = PixelFormat.Format32bppArgb |
||
) |
Draws the graph to a new bitmap and returns the bitmap.
width | The width of the bitmap. |
height | The height of the bitmap. |
backColor | The background color for the bitmap. |
antialias | Specifies whether anti-aliasing should take place when drawing. |
pixelFormat | The pixel format of the bitmap. Default value: 32-bit ARGB. |
Definition at line 308 of file Drawing.cs.
|
getset |
Assigns a pen to each arc.
Default value: assign DirectedPen to directed arcs, and UndirectedPen to edges.
Definition at line 212 of file Drawing.cs.
|
getset |
The pen used for directed arcs.
Default value: a black pen with an arrow end. Unused if ArcPens is set to a custom value.
Definition at line 216 of file Drawing.cs.
|
getset |
The graph to draw.
Definition at line 198 of file Drawing.cs.
|
getset |
Assigns its caption to a node.
Default value: assign the empty string (i.e. no caption) to each node.
Definition at line 203 of file Drawing.cs.
|
getset |
Assigns its position to a node.
Definition at line 200 of file Drawing.cs.
Assigns its style to a node.
Default value: assign a default NodeStyle to each node.
Definition at line 209 of file Drawing.cs.
|
getset |
The pen used for undirected arcs.
Default value: Pens.Black. Unused if ArcPen is set to a custom value.
Definition at line 220 of file Drawing.cs.