]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - pgsrc/Help%2FAsciiSVGPlugin
Initialize $html
[SourceForge/phpwiki.git] / pgsrc / Help%2FAsciiSVGPlugin
1 Date: Fri,  7 Dec 2012 14:58:45 +0000
2 Mime-Version: 1.0 (Produced by PhpWiki 1.4.0)
3 Content-Type: application/x-phpwiki;
4   pagename=Help%2FAsciiSVGPlugin;
5   flags=PAGE_LOCKED%2CEXTERNAL_PAGE;
6   charset=UTF-8
7 Content-Transfer-Encoding: binary
8
9 The **~AsciiSVGPlugin** [[Help:WikiPlugin|plugin]] is an interface to
10 [[http://www1.chapman.edu/~jipsen/svg/asciisvg.html]]
11
12 Requires ENABLE_XHTML_XML = true
13
14 Syntax: [[http://www1.chapman.edu/~jipsen/svg/asciisvgcommands.html]]
15
16 If you are using Internet Explorer 6 + Adobe SVGviewer (often included
17 by default with Windows XP) or SVG-enabled Firefox (2.0 or above)
18 then you should see the examples.
19
20 == Usage ==
21 {{{
22 <<AsciiSVG width= height= onmousemove="" script=""
23          code...
24 >>
25 }}}
26
27 == Arguments ==
28
29 {| class="bordered"
30 |-
31 ! Argument
32 ! Description
33 ! Default value
34 |-
35 | **height**
36 | graph width
37 | 200
38 |-
39 | **height**
40 | graph height
41 | 200
42 |-
43 | **script**
44 |
45 | false
46 |-
47 | **onmouseover**
48 |
49 | false
50 |}
51
52 All other arguments are passed to the ASCIISvg javascript library and rendered as SVG.
53
54 See [[http://www1.chapman.edu/~jipsen/svg/asciisvg.html]]
55
56 == Example ==
57
58 {{{
59 <<AsciiSVG width="117" height="117"
60   initPicture(-10,10)
61   axes()
62   stroke = "red"
63   p = []
64   with (Math)
65     for (t = 0; t < 10.01; t += 0.05)
66       p[p.length] = [t*cos(PI*t), t*sin(PI*t)]
67   path(p)
68 >>
69 }}}
70
71 <<AsciiSVG width="117" height="117"
72   initPicture(-10,10)
73   axes()
74   stroke = "red"
75   p = []
76   with (Math)
77     for (t = 0; t < 10.01; t += 0.05)
78       p[p.length] = [t*cos(PI*t), t*sin(PI*t)]
79   path(p)
80 >>
81
82 == Known Problems ==
83
84 With multiple ~AsciiSVG plugins on the same page the second and subsequent ones will have the same width and height.
85
86 == Author ==
87 * [[Help:Reini Urban|Reini Urban]]
88
89 == See Also ==
90 * [[Help:AsciiMathPlugin]]
91 * [[Help:ChartPlugin]]
92
93 <noinclude>
94 ----
95 [[PhpWikiDocumentation]] [[CategoryWikiPlugin]]
96 </noinclude>