Parent Directory
|
Revision Log
|
Revision Graph
Initial commit
| 1 | <?php |
| 2 | // $Id$ |
| 3 | |
| 4 | function graphviz_formats_graphviz_formats() { |
| 5 | return array( |
| 6 | 'svg', |
| 7 | 'svgz', |
| 8 | 'fig', |
| 9 | ); |
| 10 | } |
| 11 | |
| 12 | function graphviz_formats_graphviz_render($inpath, $outpath, $format, $args) { |
| 13 | switch ($format) { |
| 14 | case 'svg': |
| 15 | case 'svgz': |
| 16 | $outurl = url($outpath); |
| 17 | return <<<EOS |
| 18 | <object type="image/svg+xml" data="$outurl"> |
| 19 | <embed type="image/svg+xml" src="$outurl" pluginspage="http://www.adobe.com/svg/viewer/install/" /> |
| 20 | </object> |
| 21 | EOS; |
| 22 | case 'fig': |
| 23 | $fig = file_get_contents($outpath); |
| 24 | return <<<EOS |
| 25 | <pre>$fig</pre> |
| 26 | EOS; |
| 27 | } |
| 28 | } |
| 29 |
| ViewVC Help | |
| Powered by ViewVC 1.1.2 |