imbSCI.Graph.MXGraph.utils Namespace |
| Class | Description | |
|---|---|---|
| mxCellRenderer |
Class that can draw an independent array of cells.
| |
| mxCellRendererCanvasFactory |
Defines the requirements for a class that can create canvases.
| |
| mxCellRendererImageCanvasFactory |
FIXME: Use anonymous class in CreateImage with invocation parameters
in factory method code.
| |
| mxConstants |
Defines various global constants.
| |
| mxImageBundle |
Maps from keys to base64 encoded images or file locations. All values must
be URLs or use the format data:image/format followed by a comma and the base64
encoded image data, eg. "data:image/gif,XYZ", where XYZ is the base64 encoded
image data.
To add a new image bundle to an existing graph, the following code is used:
mxImageBundle bundle = new mxImageBundle();
bundle.PutImage("myImage", "data:image/gif,R0lGODlhEAAQAMIGAAAAAICAAICAgP" +
"//AOzp2O3r2////////yH+FUNyZWF0ZWQgd2l0aCBUaGUgR0lNUAAh+QQBCgAHACwAAAAA" +
"EAAQAAADTXi63AowynnAMDfjPUDlnAAJhmeBFxAEloliKltWmiYCQvfVr6lBPB1ggxN1hi" +
"laSSASFQpIV5HJBDyHpqK2ejVRm2AAgZCdmCGO9CIBADs=");
graph.AddImageBundle(bundle);
The image can then be referenced in any cell style using image=myImage.
To convert a given Image to a base64 encoded String, the following
code can be used:
MemoryStream ms = new System.IO.MemoryStream();
image.Save(ms, System.Drawing.Imaging.ImageFormat.Gif);
byte[] data = ms.ToArray();
Console.WriteLine("base64="+Convert.ToBase64String(data));
The value is decoded in mxUtils.LoadImage. The keys for images are
resolved and the short format above is converted to a data URI in
mxGraph.postProcessCellStyle.
| |
| mxPoint |
Implements a 2-dimensional point with double precision coordinates.
| |
| mxRectangle |
Implements a 2-dimensional rectangle with double precision coordinates.
| |
| mxUtils |
Contains various helper methods for use with mxGraph.
|