Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
executable file
·
50 lines (42 loc) · 1.56 KB

File metadata and controls

executable file
·
50 lines (42 loc) · 1.56 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
/**
* $Id: reader.php,v 1.14 2011/02/23 10:28:19 gaudenz Exp $
* Copyright (c) 2006, Gaudenz Alder
*/
include_once("../src/mxServer.php");
/**
* Function: main
*
* Reads a graph view XML file and creates HTML on the fly,
* ie. without creating a graph and model for it.
*/
function main()
{
// Reads the XML representation of a graph_view_! If you need to
// create an image for a graph_model_ then use the following code:
//
// $doc = mxUtils::parseXml($xml);
// $dec = new mxCodec($doc);
// $dec->decode($doc->documentElement, $graph->getModel());
//
// $image = $graph->createImage(null, "#FFFFFF");
$filename = "diagrams/graphview.xml";
//echo mxGraphViewHtmlReader::convertFile($filename);
// Creates a PNG representation of the file
$image = mxGraphViewImageReader::convertFile($filename, "#FFFFFF");
// Creates an interlaced image for better loading in the browser
//imageInterlace($image, 1);
// Marks background color as being transparent
//imageColorTransparent($image, imageColorAllocate($image, 255, 255, 255));
header("Content-Type: image/png");
echo mxUtils::encodeImage($image);
}
// Uses a local font so that all examples work on all platforms. This can be
// changed to vera on Mac or arial on Windows systems.
mxConstants::$DEFAULT_FONTFAMILY = "ttf/verah.ttf";
// If you can't get the fonts to render try using one of the following:
//mxConstants::$DEFAULT_FONTFAMILY = "C:\WINDOWS\Fonts\arial.ttf";
//mxConstants::$DEFAULT_FONTFAMILY = "verah"; putenv("GDFONTPATH=".realpath("./ttf"));
//mxConstants::$TTF_ENABLED = false;
main();
?>
Morty Proxy This is a proxified and sanitized view of the page, visit original site.