Subversion-Projekte lars-tiefland.php_share

Revision

Blame | Letzte Änderung | Log anzeigen | RSS feed

<style type="text/css">
                <!--
                A:link        {font-family: helvetica, arial, geneva, sans-serif; font-size: x-small; text-decoration: none; color: #0000ff}
                A:visited     {font-family: helvetica, arial, geneva, sans-serif; font-size: x-small; text-decoration: none; color: #0000ff}
                A:hover       {font-family: helvetica, arial, geneva, sans-serif; font-size: x-small; text-decoration: underline; color: #FF0000}
                th            {font-family: helvetica, arial; color : blue; font-size:85%; background : lightgrey; border-right:black solid 1pt; border-bottom:black solid 1pt;}
                //-->
                </style><hr><a name="_C_ICONPLOT"><div style="background-color:yellow;font-family:courier new;"></a>CLASS <b>IconPlot</b></div>
<i>(Defined in: jpgraph.php : 7792)</i><table border=1><tr><td>&nbsp;<a href="IconPlot.html" style="font-family:arial;font-weight:bold;color:darkblue;">IconPlot</a>&nbsp;</td></tr><tr><td valign=top>&nbsp;<a href="IconPlot.html#_ICONPLOT_ICONPLOT">IconPlot()</a>&nbsp;<br>
&nbsp;<a href="IconPlot.html#_ICONPLOT_SETANCHOR">SetAnchor()</a>&nbsp;<br>
&nbsp;<a href="IconPlot.html#_ICONPLOT_SETCOUNTRYFLAG">SetCountryFlag()</a>&nbsp;<br>
&nbsp;<a href="IconPlot.html#_ICONPLOT_SETMIX">SetMix()</a>&nbsp;<br>
&nbsp;<a href="IconPlot.html#_ICONPLOT_SETPOS">SetPos()</a>&nbsp;<br>
&nbsp;<a href="IconPlot.html#_ICONPLOT_SETSCALE">SetScale()</a>&nbsp;<br>
</td></tr></table>&nbsp;<p><div style="font-weight:bold;font-family:arial;font-size:100%;">Class usage and Overview</div>Make it possible to add one or several images on top of the background in the graph. This is constructed in the same way as normal plots are created and the images are added as normal with the GRaph::Add() method.

It is possoble to specify arbitrary positions as well as mix (blend) and scaling.

Example:

$icon = new IconPlot('myicon.png',0.5,0.5);
..
$graph->Add($icon); <p> &nbsp;
<hr><span style="font-family:arial;font-size:120%;font-weight:bold;">Class Methods</span><hr><p>
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_ICONPLOT_ICONPLOT"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
function&nbsp;IconPlot($aFile,$aX,$aY,$aScale,$aMix)</font>
</b></div></a></span>

<span style='font-family:arial;font-size:90%;'><i>Create a new icon image to be added to the graph</i></span><p>

<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
$aFile</font>

</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
""</font>
</td><td>File name of image</td></tr>

<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
$aX</font>

</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
0</font>
</td><td>X-position</td></tr>

<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
$aY</font>

</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
0</font>
</td><td>Y-position</td></tr>

<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
$aScale</font>

</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1.0</font>
</td><td>Scale</td></tr>

<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
$aMix</font>

</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
100</font>
</td><td>Mixin value</td></tr>
</table>

<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Create a new icon image to be added to the graph. The position can be specified as either absolute coordinates or as fractions of the width and height repsectively.

Scale can be an arbitrary floating point number indicating the scaling of the image.

The mix values specifies (in percent 1-100) how much of the image should be mixed in on top of the background.
&nbsp;<br>

<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
$icon&nbsp;=&nbsp;new&nbsp;IconPlot('myfile.png',0.5,0.5,1,50);
<br /></font>
</span><br>
<p>
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_ICONPLOT_SETANCHOR"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
function&nbsp;SetAnchor($aXAnchor,$aYAnchor)</font>
</b></div></a></span>

<span style='font-family:arial;font-size:90%;'><i>Specify anchor point for image</i></span><p>

<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
$aXAnchor</font>

</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
'left'</font>
</td><td>Horizontal anchor</td></tr>

<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
$aYAnchor</font>

</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
'center'</font>
</td><td>Verticla anchor</td></tr>
</table>

<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Specify anchor point for image. 

Horizontal anchor can be "left','center','right' and vertical anchor can be 'top','center','bottom'

By default the anchor is the top left corner ('left','top')&nbsp;<br>

<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
$icon-&gt;SetAnchor('center','center');</font>
</span><br>
<p>
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_ICONPLOT_SETCOUNTRYFLAG"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
function&nbsp;SetCountryFlag($aFlag,$aX,$aY,$aScale,$aMix,$aStdSize)</font>
</b></div></a></span>

<span style='font-family:arial;font-size:90%;'><i>Use one of the country flags as icons</i></span><p>

<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
$aFlag</font>

</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Partial or full country name</td></tr>

<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
$aX</font>

</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>X-position</td></tr>

<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
$aY</font>

</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Y-position</td></tr>

<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
$aScale</font>

</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Scaleing of image</td></tr>

<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
$aMix</font>

</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Blend factor (0-100)</td></tr>

<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
$aStdSize</font>

</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Which of the flag standard sizes should be used as the original image (1-4)</td></tr>
</table>

<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Use one of the country flags as icons
&nbsp;<br>

<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
$icon&nbsp;=&nbsp;new&nbsp;IconPlot();
<br />$icon-&gt;SetCountryFlag('norway',0.1,0.1);
<br /></font>
</span><br>
<p>
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_ICONPLOT_SETMIX"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
function&nbsp;SetMix($aMix)</font>
</b></div></a></span>

<span style='font-family:arial;font-size:90%;'><i>Specify mix value in percent (0-100) for image-</i></span><p>

<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
$aMix</font>

</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Mix value (0-100)</td></tr>
</table>

<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Specify mix value in percent (0-100) for image. The mix value can also be specified directly in the constructor IconPlot().
&nbsp;<br>

<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
$icon-&gt;SetMix(50);</font>
</span><br>
<p>
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_ICONPLOT_SETPOS"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
function&nbsp;SetPos($aX,$aY)</font>
</b></div></a></span>

<span style='font-family:arial;font-size:90%;'><i>Specify position for image</i></span><p>

<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
$aX</font>

</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>X-position</td></tr>

<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
$aY</font>

</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Y-position</td></tr>
</table>

<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Specify position for image. Position can be specified as either absolute coordinates or as fractions of the width and height.

The anchor point in the image can be adjusted with a call to SetAnchor(). By default the anchor point is the top left corner.
&nbsp;<br>
 &nbsp; <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="IconPlot.html#_ICONPLOT_SETANCHOR">IconPlot::SetAnchor</a>
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
$icon-&gt;SetPos(0.5,0.5);</font>
</span><br>
<p>
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_ICONPLOT_SETSCALE"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
function&nbsp;SetScale($aScale)</font>
</b></div></a></span>

<span style='font-family:arial;font-size:90%;'><i>Set scaling for image</i></span><p>

<table cellspacing=0 style='border:black solid 1pt;' width=100%>
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
$aScale</font>

</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Scale value.</td></tr>
</table>

<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Set scaling for image. This allows you to adjust the size of the image.&nbsp;<br>

<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
$icon-&gt;SetScale(0.8);</font>
</span><br>
<p> <hr> <p>