aboutsummaryrefslogtreecommitdiffstats
path: root/lib/percept/doc/src/egd_ug.xmlsrc
blob: 85d41ada798ac7a41f19aecdfd38014145816e77 (plain) (blame)
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">

<chapter>
  <header>
    <copyright>
      <year>2007</year>
      <year>2016</year>
      <holder>Ericsson AB, All Rights Reserved</holder>
    </copyright>
    <legalnotice>
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at
 
      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.

  The Initial Developer of the Original Code is Ericsson AB.
    </legalnotice>

    <title>egd</title>
    <prepared>Björn-Egil Dahlberg</prepared>
    <docno></docno>
    <date>2007-11-03</date>
    <rev>A</rev>
    <file>egd_ug.xml</file>
  </header>
  <section>
    <title>Introduction</title>
      <p>
	The egd module is an interface for 2d-image rendering and is used by
	Percept to generate dynamic graphs to its web pages. All code is pure
	erlang, no drivers needed.
      </p>
      <p>
	The library is intended for small to medium image sizes with low
	complexity for optimal performance. The library handles horizontal
	lines better then vertical lines.
      </p>
      <p>
	The foremost purpose for this module is to enable users to 
	generate images from erlang code and/or datasets and to 
	send these images to either files or web servers.
      </p>
  </section>
  <section>
    <title>File example</title>
    <p>Drawing examples:</p>
    <codeinclude file="img.erl" tag="" type="none"></codeinclude>
    <p> First save. </p>
    <image file="test1.gif">
      <icaption>test1.png</icaption>
    </image>

    <p> Second save. </p>
    <image file="test2.gif">
      <icaption>test2.png</icaption>
    </image>

    <p> Third save. </p>
    <image file="test3.gif">
      <icaption>test3.png</icaption>
    </image>

    <p> Fourth save. </p>
    <image file="test4.gif">
      <icaption>test4.png</icaption>
    </image>
  </section>
  <section>
    <title>ESI example</title>
      <p>Using egd with inets ESI to generate images on the fly:</p>
      <codeinclude file="img_esi.erl" tag="" type="none"></codeinclude>
      <image file="img_esi_result.gif">
        <icaption>Example of result.</icaption>
      </image>
      <p>
	For more information regarding ESI, please see inets application 
	<seealso marker="inets:mod_esi">mod_esi</seealso>.
      </p>
  </section>
</chapter>