Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
2
<HTML>
3
<HEAD>
4
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=iso-iso-8859-1">
5
<LINK REL="Start" HREF="index.html">
6
<LINK REL="Contents" HREF="toc.html">
7
<LINK REL="Prev" HREF="922Usingcountryflagsinvariouscontext.html">
8
<LINK REL="Next" HREF="10Workingwithcanvasgraphs.html">
9
<STYLE TYPE="text/css"><!--
10
BODY { font-family: serif }
11
H1 { font-family: sans-serif }
12
H2 { font-family: sans-serif }
13
H3 { font-family: sans-serif }
14
H4 { font-family: sans-serif }
15
H5 { font-family: sans-serif }
16
H6 { font-family: sans-serif }
17
SUB { font-size: smaller }
18
SUP { font-size: smaller }
19
PRE { font-family: monospace }
20
A { text-decoration: none }
21
--></STYLE>
22
</HEAD>
23
<BODY>
24
<A HREF="toc.html">Contents</A>
25
<A HREF="922Usingcountryflagsinvariouscontext.html">Previous</A>
26
<A HREF="10Workingwithcanvasgraphs.html">Next</A>
27
<HR NOSHADE>
28
<H2><A NAME="9_23">9.23 Adding icons onto the graph</A></H2>
29
<P> In addition to the standard background image you can also add an
30
 arbitrary number of icons onto the background of the graph. These icons
31
 are created with a call to the special Plot class<I> IconPlot</I>.</P>
32
<P> The image from icons are taken from a file or as one of the builtin
33
 country flags.</P>
34
<P> You may control how much of the icon should be blended into the
35
 background by specifying a percentage (1-100). The example below shows
36
 how to mix in the picture of &quot;Tux&quot; into the background of a filled line
37
 graph. Note: This example uses alpha blending and will therefore
38
 require GD2.<DIV class="example">
39
<BR> <A href="exframes/frame_lineiconex1.html" target="blank"><IMG border="0"
40
HEIGHT="250"       src="img/img/img/img/img/img/lineiconex1.png" WIDTH="400"></A>
41
<BR><B>Figure 184:</B> Adding an icon into the background <A href="exframes/frame_lineiconex1.html"
42
target="blank">[src]</A>&nbsp;
43
<P></P>
44
</DIV></P>
45
<P> To specify any of the roughly 200 country flags as an icon you first
46
 create an empty Icon and then call the IconPlot::SetCountryFlag() with
47
 the appropriate parameters. (See the class reference). This is
48
 illustrated below by adding the Icelandic flag into the background as
49
 an icon<DIV class="example">
50
<BR> <A href="exframes/frame_lineiconex2.html" target="blank"><IMG border="0"
51
HEIGHT="250"       src="img/img/img/img/img/img/lineiconex2.png" WIDTH="400"></A>
52
<BR><B>Figure 185:</B> Adding an icon flag into the background <A href="exframes/frame_lineiconex2.html"
53
target="blank">[src]</A>&nbsp;
54
<P></P>
55
</DIV></P>
56
<P><DIV class="note"><B>Note:</B> Some older versions of PHP pre-4.3.3
57
 using the builtin GD have problems rendering blended images. If you
58
 have this problem then you need to upgrade to a more recent version of
59
 PHP.</DIV></P>
60
<HR NOSHADE>
61
<A HREF="toc.html">Contents</A>
62
<A HREF="922Usingcountryflagsinvariouscontext.html">Previous</A>
63
<A HREF="10Workingwithcanvasgraphs.html">Next</A>
64
</BODY>
65
</HTML>