Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<style type="text/css">
2
		<!--
3
		A:link        {font-family: helvetica, arial, geneva, sans-serif; font-size: x-small; text-decoration: none; color: #0000ff}
4
		A:visited     {font-family: helvetica, arial, geneva, sans-serif; font-size: x-small; text-decoration: none; color: #0000ff}
5
		A:hover       {font-family: helvetica, arial, geneva, sans-serif; font-size: x-small; text-decoration: underline; color: #FF0000}
6
		th            {font-family: helvetica, arial; color : blue; font-size:85%; background : lightgrey; border-right:black solid 1pt; border-bottom:black solid 1pt;}
7
		//-->
8
		</style><hr><a name="_C_ROTIMAGE"><div style="background-color:yellow;font-family:courier new;"></a>CLASS <b>RotImage</b> EXTENDS <a href="Image.html#_C_IMAGE" style="font-face:arial;font-weight:bold;">Image</a></div>
9
<i>(Defined in: jpgraph.php : 7530)</i><table border=1><tr><td>&nbsp;<a href="RotImage.html" style="font-family:arial;font-weight:bold;color:darkblue;">RotImage</a>&nbsp;</td><td>&nbsp;<a href="Image.html" style="font-family:arial;font-weight:bold;color:darkblue;">Image</a>&nbsp;</td></tr><tr><td valign=top>&nbsp;<a href="RotImage.html#_ROTIMAGE_SETANGLE">SetAngle()</a>&nbsp;<br>
10
&nbsp;<a href="RotImage.html#_ROTIMAGE_SETCENTER">SetCenter()</a>&nbsp;<br>
11
&nbsp;<a href="RotImage.html#_ROTIMAGE_SETMARGIN">SetMargin()</a>&nbsp;<br>
12
&nbsp;<a href="RotImage.html#_ROTIMAGE_SETTRANSLATION">SetTranslation()</a>&nbsp;<br>
13
</td><td valign=top>&nbsp;<a href="Image.html#_IMAGE_ROUNDEDRECTANGLE">RoundedRectangle()</a>&nbsp;<br>
14
&nbsp;<a href="Image.html#_IMAGE_SETALPHABLENDING">SetAlphaBlending()</a>&nbsp;<br>
15
&nbsp;<a href="Image.html#_IMAGE_SETANTIALIASING">SetAntiAliasing()</a>&nbsp;<br>
16
&nbsp;<a href="Image.html#_IMAGE_SETCANVASCOLOR">SetCanvasColor()</a>&nbsp;<br>
17
&nbsp;<a href="Image.html#_IMAGE_SETEXPIRED">SetExpired()</a>&nbsp;<br>
18
&nbsp;<a href="Image.html#_IMAGE_SETIMGFORMAT">SetImgFormat()</a>&nbsp;<br>
19
<a href="Image.html#_IMAGE_SETMARGIN" style="color:darkgrey;">SetMargin()&nbsp;</a><br>
20
&nbsp;<a href="Image.html#_IMAGE_SETQUALITY">SetQuality()</a>&nbsp;<br>
21
&nbsp;<a href="Image.html#_IMAGE_SETTRANSPARENT">SetTransparent()</a>&nbsp;<br>
22
</td></tr></table>&nbsp;<p><div style="font-weight:bold;font-family:arial;font-size:100%;">Class usage and Overview</div>A subclass of Image class which implements a rotated version of all methods in the base Image class.
23
 
24
The Image class used in JpGraph is actually not the class Image but rather this class as we want to have the rotating possibility.
25
 
26
The rotation is accomplished by standard 2D rotation matrices. <p> &nbsp;
27
<div style="font-weight:bold;font-family:arial;font-size:85%;">See also related classes:</div><a href="Image.html">Image</a> <p> &nbsp;<hr><span style="font-family:arial;font-size:120%;font-weight:bold;">Class Methods</span><hr><p>
28
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_ROTIMAGE_SETANGLE"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
29
function&nbsp;SetAngle($a)</font>
30
</b></div></a></span>
31
 
32
<span style='font-family:arial;font-size:90%;'><i>Specify rotation angle</i></span><p>
33
 
34
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
35
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
36
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
37
$a</font>
38
 
39
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Angle in degrees</td></tr>
40
</table>
41
 
42
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Specify the rotation angle for the other graphic primitives in this class.
43
 
44
The rotation is performed around point (0,0).
45
&nbsp;<br>
46
 &nbsp; <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="RotImage.html#_ROTIMAGE_SETTRANSLATION">RotImage::SetTranslation</a> and <a href="RotImage.html#_ROTIMAGE_SETCENTER">RotImage::SetCenter</a>
47
<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">
48
$graph-&gt;img-&gt;SetAngle(45);
<br /></font>
49
</span><br>
50
<p>
51
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_ROTIMAGE_SETCENTER"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
52
function&nbsp;SetCenter($dx,$dy)</font>
53
</b></div></a></span>
54
55
 
56
57
 
58
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
59
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
60
$dx</font>
61
62
 
63
64
 
65
$dy</font>
66
67
 
68
</table>
69
70
 
71
&nbsp;<br>
72
 &nbsp; <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="RotImage.html#_ROTIMAGE_SETTRANSLATION">RotImage::SetTranslation</a> and <a href="RotImage.html#_ROTIMAGE_SETANGLE">RotImage::SetAngle</a>
73
<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">
74
$width=600;&nbsp;$height=400;
<br />$graph&nbsp;=&nbsp;new&nbsp;Graph($width,$height);
<br />$graph-&gt;img-&gt;SetMargin($leftm,$rightm,$topm,$bottomm);
<br />$graph-&gt;SetAngle(20);
<br />
<br />//&nbsp;Rotate&nbsp;graph&nbsp;around&nbsp;the&nbsp;plots&nbsp;(0,0)&nbsp;point,&nbsp;i.e
<br />//&nbsp;where&nbsp;the&nbsp;graph&nbsp;axis&nbsp;intersect.
<br />$graph-&gt;img-&gt;SetCenter($leftm,$height-($topm+$bottomm));
<br /></font>
75
</span><br>
76
<p>
77
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_ROTIMAGE_SETMARGIN"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
78
function&nbsp;SetMargin($lm,$rm,$tm,$bm)</font>
79
</b></div></a></span>
80
81
<span style='font-family:arial;font-size:90%;'><i>Specify margin for plot</i></span><p>
82
83
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
84
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
85
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
86
$lm</font>
87
88
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Left margin</td></tr>
89
 
90
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
91
 
92
93
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Right margin</td></tr>
94
95
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
96
 
97
98
 
99
100
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
101
 
102
103
 
104
</table>
105
106
 
107
&nbsp;<br>
108
 
109
<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">
110
$graph-&gt;img-&gt;SetMargin(30,30,50,20);
<br /></font>
111
 
112
<p>
113
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_ROTIMAGE_SETTRANSLATION"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
114
 
115
</b></div></a></span>
116
117
 
118
119
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
120
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
121
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
122
$dx</font>
123
124
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Horizontal translation</td></tr>
125
126
 
127
$dy</font>
128
 
129
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Vertical translation</td></tr>
130
</table>
131
132
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>The translation is applied after the rotation of the image.&nbsp;<br>
133
 
134
<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">
135
 
136
</span><br>
137
<p> <hr> <p>