|
||||||||||
|
New in This Group [PEAR-BUG] Doc #16920 [NEW]: Bad code sample for rethrowing exceptions in PEAR coding guide12/17/2009 5:56:17 PM [PEAR-BUG] Documentation Problem #16888 [NEW]: User note that is a documentation problem12/8/2009 12:14:57 AM [PEAR-BUG] Doc #16779 [NEW]: Tell people how to check if pear is installed on shared host with web interface11/10/2009 7:13:37 PM [PEAR-BUG][Reminder] Reminder about open bugs in Documentation11/1/2009 9:42:02 AM [PEAR-BUG][Reminder] Reminder about open bugs in Documentation10/1/2009 8:42:02 AM [PEAR-BUG] Feature/Change Request #16608 [NEW]: pear documentation prev/next links missing rel attributes9/15/2009 1:21:04 AM [PEAR-BUG] Bug #16607 [NEW]: Installation guidelines instruct you to use command that fails9/14/2009 7:31:24 PM PhD 0.9 Released9/11/2009 1:00:06 PM [PEAR-BUG] Bug #16577 [NEW]: Documentation incorrect9/7/2009 8:20:17 PM [PEAR-BUG][Reminder] Reminder about open bugs in Documentation9/1/2009 8:42:02 AM |
svn: /pear/peardoc/trunk/en/package/ images/image-graphviz/about.xml images/image-graphviz/example.xml images/image-graphviz/examples/simple.php images/image-graphviz/images/simple.png images/image-gr
|
|||||||||
| Group: php.pear.doc |
Subscribe
|
Posted:9/4/2009 9:47:07 PM | Replies:0 | Views:8 | Items(0) |
|
--f8c2523813f77d5ada45668ec3f7d82f96f49e72
Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit cweiske Fri, 04 Sep 2009 21:47:07 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=288071 Log: add a little image_graphviz documentation Changed paths: A pear/peardoc/trunk/en/package/images/image-graphviz/ A pear/peardoc/trunk/en/package/images/image-graphviz/about.xml A pear/peardoc/trunk/en/package/images/image-graphviz/example.xml A pear/peardoc/trunk/en/package/images/image-graphviz/examples/ A pear/peardoc/trunk/en/package/images/image-graphviz/examples/simple.php A pear/peardoc/trunk/en/package/images/image-graphviz/images/ A pear/peardoc/trunk/en/package/images/image-graphviz/images/simple.png A pear/peardoc/trunk/en/package/images/image-graphviz.xml U pear/peardoc/trunk/en/package/images-entities.xml Added: pear/peardoc/trunk/en/package/images/image-graphviz/about.xml =================================================================== --- pear/peardoc/trunk/en/package/images/image-graphviz/about.xml (rev 0) +++ pear/peardoc/trunk/en/package/images/image-graphviz/about.xml 2009-09-04 21:47:07 UTC (rev 288071) @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8"?> +<chapter xmlns="http://docbook.org/ns/docbook" version="lillet" + xml:id="package.images.image-graphviz.about" +> + <info> + <title>About Image_GraphViz</title> + </info> + + <para> + <classname>Image_GraphViz</classname> is a class that provides + methods to generate graphviz (dot) files. It also calls graphviz + with all necessary parameters and outputs the generated image + to the browser, or stores it into a file. + </para> + <para> + The package supports clusters, nodes, edges and all attributes + to either of them. Apart from that, <classname>Image_GraphViz</classname> + is able to store and load its own graph definition files. + </para> + <para> + While it abstracts the actual generation of dot files, one still needs + to know the + <emphasis>dot attributed graph language</emphasis> + to take full advantage of the package - especially for style and layout + adjustments. + </para> + +</chapter> Added: pear/peardoc/trunk/en/package/images/image-graphviz/example.xml =================================================================== --- pear/peardoc/trunk/en/package/images/image-graphviz/example.xml (rev 0) +++ pear/peardoc/trunk/en/package/images/image-graphviz/example.xml 2009-09-04 21:47:07 UTC (rev 288071) @@ -0,0 +1,78 @@ +<?xml version="1.0" encoding="utf-8"?> +<chapter + xmlns="http://docbook.org/ns/docbook" + xmlns:phd="http://www.php.net/ns/phd" + version="lillet" + xml:id="package.images.image-graphviz.example" +> + <info> + <title>A simple graphviz example</title> + </info> + + <para> + The following code shows how to use + <classname>Image_GraphViz</classname> the easiest way + possible - generate a simple directed graph and send it as + SVG image to the browser. + </para> + + <programlisting role="php"> + <xi:include parse="text" + xmlns:xi="http://www.w3.org/2001/XInclude" + href="&package.images.image-graphviz.examples.simple.php;" + > + <xi:fallback>FIXME:MISSING XINCLUDE CONTENT</xi:fallback> + </xi:include> + </programlisting> + + <para> + The example above will display in your browser as follows: + </para> + + <figure> + <screenshot> + <mediaobject> + <alt>Simple example output</alt> + <imageobject> + <imagedata + align="center" format="png" + fileref="en/package/images/image-graphviz/images/simple.png" + /> + </imageobject> + </mediaobject> + </screenshot> + </figure> + + <para> + The <phd:pearapi phd:package="Image_GraphViz" + phd:linkend="Image_GraphViz">constructor</phd:pearapi> does not need + any parameters, but one may tell it if the graph is directed, + an array of attributes and the name of the graph. + </para> + + <para> + To generate content, serveral methods are available: + <phd:pearapi phd:package="Image_GraphViz" + phd:linkend="Image_GraphViz::addEdge()">addEdge()</phd:pearapi>, + <phd:pearapi phd:package="Image_GraphViz" + phd:linkend="Image_GraphViz::addNode()">addNode()</phd:pearapi>, + and <phd:pearapi phd:package="Image_GraphViz" + phd:linkend="Image_GraphViz::addCluster()">addCluster()</phd:pearapi>. + </para> + + <para> + Calling graphviz' <emphasis>dot</emphasis> or <emphasis>neato</emphasis> + is being done by <classname>Image_GraphViz</classname> implicitly + when calling + <phd:pearapi phd:package="Image_GraphViz" + phd:linkend="Image_GraphViz::image()">image()</phd:pearapi> + or + <phd:pearapi phd:package="Image_GraphViz" + phd:linkend="Image_GraphViz::fetch()">fetch()</phd:pearapi>. + Both can be used to generate and display/return image data in + a large number of image formats, including + <literal>svg</literal>, <literal>png</literal>, <literal>pdf</literal> + and <literal>plain</literal> text. + </para> + +</chapter> Added: pear/peardoc/trunk/en/package/images/image-graphviz/examples/simple.php =================================================================== --- pear/peardoc/trunk/en/package/images/image-graphviz/examples/simple.php (rev 0) +++ pear/peardoc/trunk/en/package/images/image-graphviz/examples/simple.php 2009-09-04 21:47:07 UTC (rev 288071) @@ -0,0 +1,8 @@ +<?php +require_once 'Image/GraphViz.php'; + +$gv = new Image_GraphViz(); +$gv->addEdge(array('wake up' => 'visit bathroom')); +$gv->addEdge(array('visit bathroom' => 'make coffee')); +$gv->image(); +?> \ No newline at end of file Added: pear/peardoc/trunk/en/package/images/image-graphviz/images/simple.png =================================================================== (Binary files differ) Property changes on: pear/peardoc/trunk/en/package/images/image-graphviz/images/simple.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: pear/peardoc/trunk/en/package/images/image-graphviz.xml =================================================================== --- pear/peardoc/trunk/en/package/images/image-graphviz.xml (rev 0) +++ pear/peardoc/trunk/en/package/images/image-graphviz.xml 2009-09-04 21:47:07 UTC (rev 288071) @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8"?> +<book xmlns="http://docbook.org/ns/docbook" version="lillet" + xml:id="package.images.image-graphviz" +> + <info> + <title>Image_GraphViz</title> + <abstract> + <para> + <classname>Image_GraphViz</classname> provides an object oriented + wrapper to generate and output dot files. + </para> + </abstract> + </info> + + &package.images.image-graphviz.about; + &package.images.image-graphviz.example; + +</book> Modified: pear/peardoc/trunk/en/package/images-entities.xml =================================================================== --- pear/peardoc/trunk/en/package/images-entities.xml 2009-09-04 20:48:16 UTC (rev 288070) +++ pear/peardoc/trunk/en/package/images-entities.xml 2009-09-04 21:47:07 UTC (rev 288071) @@ -1,5 +1,6 @@ &package.images.image-barcode; &package.images.image-canvas; &package.images.image-graph; +&package.images.image-graphviz; &package.images.image-text; &package.images.image-transform; --f8c2523813f77d5ada45668ec3f7d82f96f49e72-- |
cwei...@php.net (=?utf-8?q?Christian_Weiske?=) 9/4/2009 9:47:07 PM |
note 97095 added to soapclient.soapclient
note 97094 added to function.sqlite-changes
note 97093 added to function.sqlite-changes
note 97092 added to ref.xmlrpc
note 97091 added to function.var-export