2012-05-21 20:32:26 +00:00
<!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" / >
2013-04-04 11:51:15 +00:00
< meta http-equiv = "X-UA-Compatible" content = "IE=9" / >
< title > mxGraph: com.mxgraph.mxImageBundle Class Reference< / title >
2012-05-21 20:32:26 +00:00
< link href = "tabs.css" rel = "stylesheet" type = "text/css" / >
2013-04-04 11:51:15 +00:00
< link href = "doxygen.css" rel = "stylesheet" type = "text/css" / >
2012-05-21 20:32:26 +00:00
< / head >
< body >
2013-04-04 11:51:15 +00:00
< 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 >
2012-05-21 20:32:26 +00:00
< li class = "current" > < a href = "annotated.html" > < span > Classes< / span > < / a > < / li >
< li > < a href = "dirs.html" > < span > Directories< / span > < / a > < / li >
< / ul >
< / div >
2013-04-04 11:51:15 +00:00
< 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 >
2012-05-21 20:32:26 +00:00
< / ul >
< / div >
2013-04-04 11:51:15 +00:00
< 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 >
2012-05-21 20:32:26 +00:00
< / div >
< / div >
2013-04-04 11:51:15 +00:00
< 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 -->
2012-05-21 20:32:26 +00:00
< div class = "contents" >
2013-04-04 11:51:15 +00:00
<!-- doxytag: class="com::mxgraph::mxImageBundle" -->
2012-05-21 20:32:26 +00:00
< 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.
2013-04-04 11:51:15 +00:00
< a href = "classcom_1_1mxgraph_1_1mxImageBundle.html#details" > More...< / a > < / p >
2012-05-21 20:32:26 +00:00
< p > < a href = "classcom_1_1mxgraph_1_1mxImageBundle-members.html" > List of all members.< / a > < / p >
2013-04-04 11:51:15 +00:00
< 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 >
2012-05-21 20:32:26 +00:00
< / table >
2013-04-04 11:51:15 +00:00
< 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 >
2012-05-21 20:32:26 +00:00
< p > To add a new image bundle to an existing graph, the following code is used:< / p >
2013-04-04 11:51:15 +00:00
< 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 >
2012-05-21 20:32:26 +00:00
< 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 >
2013-04-04 11:51:15 +00:00
< 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)" -->
2012-05-21 20:32:26 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2013-04-04 11:51:15 +00:00
< td class = "memname" > String < a class = "el" href = "classcom_1_1mxgraph_1_1mxImageBundle.html#aeb573dee291df27a7297be30c18fda38" > com.mxgraph.mxImageBundle.GetImage< / a > < / td >
2012-05-21 20:32:26 +00:00
< td > (< / td >
2013-04-04 11:51:15 +00:00
< td class = "paramtype" > String  < / td >
< td class = "paramname" > < em > key< / em > < / td > < td > )< / td >
2012-05-21 20:32:26 +00:00
< td > < code > [inline]< / code > < / td >
< / tr >
< / table >
< / div >
< div class = "memdoc" >
< p > Returns the value for the given key. < / p >
< / div >
< / div >
2013-04-04 11:51:15 +00:00
< a class = "anchor" id = "ac08a8c7641c7c68aed104a90e0b7dbe9" > < / a > <!-- doxytag: member="com::mxgraph::mxImageBundle::PutImage" ref="ac08a8c7641c7c68aed104a90e0b7dbe9" args="(String key, String value)" -->
2012-05-21 20:32:26 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2013-04-04 11:51:15 +00:00
< td class = "memname" > void < a class = "el" href = "classcom_1_1mxgraph_1_1mxImageBundle.html#ac08a8c7641c7c68aed104a90e0b7dbe9" > com.mxgraph.mxImageBundle.PutImage< / a > < / td >
2012-05-21 20:32:26 +00:00
< td > (< / td >
2013-04-04 11:51:15 +00:00
< td class = "paramtype" > String  < / td >
< td class = "paramname" > < em > key< / em > , < / td >
2012-05-21 20:32:26 +00:00
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
2013-04-04 11:51:15 +00:00
< td class = "paramtype" > String  < / td >
< td class = "paramname" > < em > value< / em >   < / td >
2012-05-21 20:32:26 +00:00
< / tr >
< tr >
< td > < / td >
< td > )< / td >
2013-04-04 11:51:15 +00:00
< td > < / td > < td > < code > [inline]< / code > < / td >
2012-05-21 20:32:26 +00:00
< / tr >
< / table >
< / div >
< div class = "memdoc" >
< p > Adds the specified entry to the map. < / p >
< / div >
< / div >
< hr / > < h2 > Member Data Documentation< / h2 >
2013-04-04 11:51:15 +00:00
< a class = "anchor" id = "af8808b2694bb6efcba40a5879b5cb505" > < / a > <!-- doxytag: member="com::mxgraph::mxImageBundle::images" ref="af8808b2694bb6efcba40a5879b5cb505" args="" -->
2012-05-21 20:32:26 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2013-04-04 11:51:15 +00:00
< 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 >
2012-05-21 20:32:26 +00:00
< / tr >
< / table >
< / div >
< div class = "memdoc" >
< p > Maps from keys to images. < / p >
< / div >
< / div >
< hr / > < h2 > Property Documentation< / h2 >
2013-04-04 11:51:15 +00:00
< a class = "anchor" id = "ae9680e72d45e7c06aa42e950ef765b63" > < / a > <!-- doxytag: member="com::mxgraph::mxImageBundle::Images" ref="ae9680e72d45e7c06aa42e950ef765b63" args="" -->
2012-05-21 20:32:26 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2013-04-04 11:51:15 +00:00
< 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 >
2012-05-21 20:32:26 +00:00
< / 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 >
2013-04-04 11:51:15 +00:00
< / div > <!-- contents -->
< hr class = "footer" / > < address class = "footer" > < small >
2013-07-19 09:51:30 +00:00
Generated on Fri Jul 19 2013 10:48:45 for mxGraph by   < a href = "http://www.doxygen.org/index.html" >
2013-04-04 11:51:15 +00:00
< img class = "footer" src = "doxygen.png" alt = "doxygen" / >
< / a > 1.7.6.1
< / small > < / address >
2012-05-21 20:32:26 +00:00
< / body >
< / html >