/[cvs]/nfo/php/libs/com.newsblob.phphtmllib/widgets/svg/SVGDocumentClass.inc
ViewVC logotype

Contents of /nfo/php/libs/com.newsblob.phphtmllib/widgets/svg/SVGDocumentClass.inc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations)
Thu May 6 16:27:52 2004 UTC (20 years, 3 months ago) by jonen
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
 updated all to v2.4.1 - Apr 01, 2004

1 <?php
2
3 /**
4 * This contains the SVGDocumentClass
5 *
6 * $Id: SVGDocumentClass.inc,v 1.3 2003/06/05 18:26:15 hemna Exp $
7 *
8 * @author Walter A. Boring IV <waboring@buildabetterweb.com>
9 * @package phpHtmlLib
10 *
11 */
12
13
14 /**
15 *
16 * This class lets you build a complete
17 * SVG document.
18 *
19 * SVG = Scalable Vector Graphics
20 *
21 * @author Walter A. Boring IV <waboring@buildabetterweb.com>
22 * @package phpHtmlLib
23 */
24 class SVGDocumentClass extends XMLDocumentClass {
25
26 /**
27 * The constructor to building a SVG document.
28 *
29 * @param string - the svg tag's width attribute
30 * @param string - the svg tag's height attribute
31 */
32 function SVGDocumentClass($width="100%", $height="100%") {
33 //make sure we render everything as XHTML
34 define("HTML_RENDER_TYPE", XHTML);
35 $this->set_doctype_source("PUBLIC");
36 XMLDocumentClass::XMLDocumentClass("svg",
37 "-//W3C//DTD SVG 1.0//EN");
38 $this->set_doctype_link("http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd");
39
40 $this->set_root_attributes(
41 array("width" => $width, "height" => $height,
42 "xmlns" => "http://www.w3.org/2000/svg"));
43
44 //turn off the character encoding
45 //$this->show_character_encoding( FALSE );
46
47 //by default we want to output the
48 //http Content-type header
49 $this->show_http_header(TRUE);
50
51 //set the correct content-type
52 $this->set_http_content_type( "image/svg+xml" );
53 }
54 }
55 ?>

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed