212 lines
10 KiB
HTML
212 lines
10 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
|
<meta name="generator" content="Doxygen 1.8.6"/>
|
|
<title>mxGraph: com.mxgraph.mxImageBundle Class Reference</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr style="height: 56px;">
|
|
<td style="padding-left: 0.5em;">
|
|
<div id="projectname">mxGraph
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.6 -->
|
|
<div id="navrow1" class="tabs">
|
|
<ul class="tablist">
|
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
|
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
|
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
|
|
</ul>
|
|
</div>
|
|
<div id="navrow2" class="tabs2">
|
|
<ul class="tablist">
|
|
<li><a href="annotated.html"><span>Class List</span></a></li>
|
|
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
|
|
<li><a href="functions.html"><span>Class Members</span></a></li>
|
|
</ul>
|
|
</div>
|
|
<div id="nav-path" class="navpath">
|
|
<ul>
|
|
<li class="navelem"><a class="el" href="namespacecom.html">com</a></li><li class="navelem"><a class="el" href="namespacecom_1_1mxgraph.html">mxgraph</a></li><li class="navelem"><a class="el" href="classcom_1_1mxgraph_1_1mxImageBundle.html">mxImageBundle</a></li> </ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="summary">
|
|
<a href="#pub-methods">Public Member Functions</a> |
|
|
<a href="#pro-attribs">Protected Attributes</a> |
|
|
<a href="#properties">Properties</a> |
|
|
<a href="classcom_1_1mxgraph_1_1mxImageBundle-members.html">List of all members</a> </div>
|
|
<div class="headertitle">
|
|
<div class="title">com.mxgraph.mxImageBundle Class Reference</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
|
|
<p>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.
|
|
<a href="classcom_1_1mxgraph_1_1mxImageBundle.html#details">More...</a></p>
|
|
<table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
|
|
Public Member Functions</h2></td></tr>
|
|
<tr class="memitem:ac08a8c7641c7c68aed104a90e0b7dbe9"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1mxgraph_1_1mxImageBundle.html#ac08a8c7641c7c68aed104a90e0b7dbe9">PutImage</a> (String key, String value)</td></tr>
|
|
<tr class="memdesc:ac08a8c7641c7c68aed104a90e0b7dbe9"><td class="mdescLeft"> </td><td class="mdescRight">Adds the specified entry to the map. <a href="#ac08a8c7641c7c68aed104a90e0b7dbe9">More...</a><br/></td></tr>
|
|
<tr class="separator:ac08a8c7641c7c68aed104a90e0b7dbe9"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aeb573dee291df27a7297be30c18fda38"><td class="memItemLeft" align="right" valign="top">String </td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1mxgraph_1_1mxImageBundle.html#aeb573dee291df27a7297be30c18fda38">GetImage</a> (String key)</td></tr>
|
|
<tr class="memdesc:aeb573dee291df27a7297be30c18fda38"><td class="mdescLeft"> </td><td class="mdescRight">Returns the value for the given key. <a href="#aeb573dee291df27a7297be30c18fda38">More...</a><br/></td></tr>
|
|
<tr class="separator:aeb573dee291df27a7297be30c18fda38"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
|
|
Protected Attributes</h2></td></tr>
|
|
<tr class="memitem:af8808b2694bb6efcba40a5879b5cb505"><td class="memItemLeft" align="right" valign="top">Dictionary< String, String > </td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1mxgraph_1_1mxImageBundle.html#af8808b2694bb6efcba40a5879b5cb505">images</a> = new Dictionary<String, String>()</td></tr>
|
|
<tr class="memdesc:af8808b2694bb6efcba40a5879b5cb505"><td class="mdescLeft"> </td><td class="mdescRight">Maps from keys to images. <a href="#af8808b2694bb6efcba40a5879b5cb505">More...</a><br/></td></tr>
|
|
<tr class="separator:af8808b2694bb6efcba40a5879b5cb505"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="properties"></a>
|
|
Properties</h2></td></tr>
|
|
<tr class="memitem:ae9680e72d45e7c06aa42e950ef765b63"><td class="memItemLeft" align="right" valign="top">Dictionary< String, String > </td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1mxgraph_1_1mxImageBundle.html#ae9680e72d45e7c06aa42e950ef765b63">Images</a><code> [get]</code></td></tr>
|
|
<tr class="memdesc:ae9680e72d45e7c06aa42e950ef765b63"><td class="mdescLeft"> </td><td class="mdescRight">Returns the images. <a href="#ae9680e72d45e7c06aa42e950ef765b63">More...</a><br/></td></tr>
|
|
<tr class="separator:ae9680e72d45e7c06aa42e950ef765b63"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<div class="textblock"><p>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. </p>
|
|
<p>To add a new image bundle to an existing graph, the following code is used:</p>
|
|
<p><a class="el" href="classcom_1_1mxgraph_1_1mxImageBundle.html" title="Maps from keys to base64 encoded images or file locations. All values must be URLs or use the format ...">mxImageBundle</a> bundle = new mxImageBundle(); bundle.PutImage("myImage", "data:image/gif,R0lGODlhEAAQAMIGAAAAAICAAICAgP" + "//AOzp2O3r2////////yH+FUNyZWF0ZWQgd2l0aCBUaGUgR0lNUAAh+QQBCgAHACwAAAAA" + "EAAQAAADTXi63AowynnAMDfjPUDlnAAJhmeBFxAEloliKltWmiYCQvfVr6lBPB1ggxN1hi" + "laSSASFQpIV5HJBDyHpqK2ejVRm2AAgZCdmCGO9CIBADs="); graph.AddImageBundle(bundle);</p>
|
|
<p>The image can then be referenced in any cell style using image=myImage.</p>
|
|
<p>To convert a given Image to a base64 encoded String, the following code can be used:</p>
|
|
<p>MemoryStream ms = new System.IO.MemoryStream(); image.Save(ms, System.Drawing.Imaging.ImageFormat.Gif); byte[] data = ms.ToArray(); Console.WriteLine("base64="+Convert.ToBase64String(data));</p>
|
|
<p>The value is decoded in <a class="el" href="classcom_1_1mxgraph_1_1mxUtils.html#a2a71827c05120b140caa51409a363282" title="Loads an image from the local filesystem, a data URI or any other URL. ">mxUtils.LoadImage</a>. The keys for images are resolved and the short format above is converted to a data URI in mxGraph.postProcessCellStyle. </p>
|
|
</div><h2 class="groupheader">Member Function Documentation</h2>
|
|
<a class="anchor" id="aeb573dee291df27a7297be30c18fda38"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">String com.mxgraph.mxImageBundle.GetImage </td>
|
|
<td>(</td>
|
|
<td class="paramtype">String </td>
|
|
<td class="paramname"><em>key</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Returns the value for the given key. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ac08a8c7641c7c68aed104a90e0b7dbe9"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void com.mxgraph.mxImageBundle.PutImage </td>
|
|
<td>(</td>
|
|
<td class="paramtype">String </td>
|
|
<td class="paramname"><em>key</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">String </td>
|
|
<td class="paramname"><em>value</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Adds the specified entry to the map. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Member Data Documentation</h2>
|
|
<a class="anchor" id="af8808b2694bb6efcba40a5879b5cb505"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">Dictionary<String, String> com.mxgraph.mxImageBundle.images = new Dictionary<String, String>()</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">protected</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Maps from keys to images. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Property Documentation</h2>
|
|
<a class="anchor" id="ae9680e72d45e7c06aa42e950ef765b63"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">Dictionary<String, String> com.mxgraph.mxImageBundle.Images</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">get</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Returns the images. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<hr/>The documentation for this class was generated from the following file:<ul>
|
|
<li>src/utils/mxImageBundle.cs</li>
|
|
</ul>
|
|
</div><!-- contents -->
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated on Thu Oct 9 2014 09:49:42 for mxGraph by  <a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
|
</a> 1.8.6
|
|
</small></address>
|
|
</body>
|
|
</html>
|