195 lines
9.6 KiB
HTML
195 lines
9.6 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"/>
|
|
<title>mxGraph: com.mxgraph.mxImageBundle Class Reference</title>
|
|
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
|
|
|
|
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div! -->
|
|
|
|
|
|
<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>
|
|
|
|
<!-- Generated by Doxygen 1.7.6.1 -->
|
|
<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>
|
|
<li><a href="dirs.html"><span>Directories</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"><b>com</b> </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>
|
|
<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> </div>
|
|
<div class="headertitle">
|
|
<div class="title">com.mxgraph.mxImageBundle Class Reference</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<!-- doxytag: class="com::mxgraph::mxImageBundle" -->
|
|
<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>
|
|
|
|
<p><a href="classcom_1_1mxgraph_1_1mxImageBundle-members.html">List of all members.</a></p>
|
|
<table class="memberdecls">
|
|
<tr><td colspan="2"><h2><a name="pub-methods"></a>
|
|
Public Member Functions</h2></td></tr>
|
|
<tr><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><td class="mdescLeft"> </td><td class="mdescRight">Adds the specified entry to the map. <a href="#ac08a8c7641c7c68aed104a90e0b7dbe9"></a><br/></td></tr>
|
|
<tr><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><td class="mdescLeft"> </td><td class="mdescRight">Returns the value for the given key. <a href="#aeb573dee291df27a7297be30c18fda38"></a><br/></td></tr>
|
|
<tr><td colspan="2"><h2><a name="pro-attribs"></a>
|
|
Protected Attributes</h2></td></tr>
|
|
<tr><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><td class="mdescLeft"> </td><td class="mdescRight">Maps from keys to images. <a href="#af8808b2694bb6efcba40a5879b5cb505"></a><br/></td></tr>
|
|
<tr><td colspan="2"><h2><a name="properties"></a>
|
|
Properties</h2></td></tr>
|
|
<tr><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><td class="mdescLeft"> </td><td class="mdescRight">Returns the images. <a href="#ae9680e72d45e7c06aa42e950ef765b63"></a><br/></td></tr>
|
|
</table>
|
|
<hr/><a name="details" id="details"></a><h2>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><hr/><h2>Member Function Documentation</h2>
|
|
<a class="anchor" id="aeb573dee291df27a7297be30c18fda38"></a><!-- doxytag: member="com::mxgraph::mxImageBundle::GetImage" ref="aeb573dee291df27a7297be30c18fda38" args="(String key)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">String <a class="el" href="classcom_1_1mxgraph_1_1mxImageBundle.html#aeb573dee291df27a7297be30c18fda38">com.mxgraph.mxImageBundle.GetImage</a> </td>
|
|
<td>(</td>
|
|
<td class="paramtype">String </td>
|
|
<td class="paramname"><em>key</em></td><td>)</td>
|
|
<td><code> [inline]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Returns the value for the given key. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ac08a8c7641c7c68aed104a90e0b7dbe9"></a><!-- doxytag: member="com::mxgraph::mxImageBundle::PutImage" ref="ac08a8c7641c7c68aed104a90e0b7dbe9" args="(String key, String value)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void <a class="el" href="classcom_1_1mxgraph_1_1mxImageBundle.html#ac08a8c7641c7c68aed104a90e0b7dbe9">com.mxgraph.mxImageBundle.PutImage</a> </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><code> [inline]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Adds the specified entry to the map. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<hr/><h2>Member Data Documentation</h2>
|
|
<a class="anchor" id="af8808b2694bb6efcba40a5879b5cb505"></a><!-- doxytag: member="com::mxgraph::mxImageBundle::images" ref="af8808b2694bb6efcba40a5879b5cb505" args="" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">Dictionary<String, String> <a class="el" href="classcom_1_1mxgraph_1_1mxImageBundle.html#af8808b2694bb6efcba40a5879b5cb505">com.mxgraph.mxImageBundle.images</a> = new Dictionary<String, String>()<code> [protected]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Maps from keys to images. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<hr/><h2>Property Documentation</h2>
|
|
<a class="anchor" id="ae9680e72d45e7c06aa42e950ef765b63"></a><!-- doxytag: member="com::mxgraph::mxImageBundle::Images" ref="ae9680e72d45e7c06aa42e950ef765b63" args="" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">Dictionary<String, String> <a class="el" href="classcom_1_1mxgraph_1_1mxImageBundle.html#ae9680e72d45e7c06aa42e950ef765b63">com.mxgraph.mxImageBundle.Images</a><code> [get]</code></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 -->
|
|
|
|
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated on Fri Aug 9 2013 10:05:12 for mxGraph by  <a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
|
</a> 1.7.6.1
|
|
</small></address>
|
|
|
|
</body>
|
|
</html>
|