48
48
<listitem >
49
49
<para >
50
50
The angle in degrees, with 0 degrees being left-to-right reading text.
51
- Higher values represent a counter-clockwise rotation. For example, a
51
+ Higher values represent a counter-clockwise rotation. For example, a
52
52
value of 90 would result in bottom-to-top reading text.
53
53
</para >
54
54
</listitem >
94
94
</para >
95
95
<para >
96
96
May include decimal numeric character references (of the form:
97
- & #8364;) to access characters in a font beyond position 127.
98
- The hexadecimal format (like & #xA9;) is supported.
97
+ < literal > & #8364;</ literal > ) to access characters in a font beyond position 127.
98
+ The hexadecimal format (like < literal > & #xA9;</ literal > ) is supported.
99
99
Strings in UTF-8 encoding can be passed directly.
100
100
</para >
101
101
<para >
102
- Named entities, such as & copy;, are not supported. Consider using
102
+ Named entities, such as < literal > & copy;</ literal > , are not supported. Consider using
103
103
<function >html_entity_decode</function >
104
104
to decode these named entities into UTF-8 strings.
105
105
</para >
116
116
&reftitle.returnvalues;
117
117
<para >
118
118
Returns an array with 8 elements representing four points making the
119
- bounding box of the text. The order of the points is lower left, lower
119
+ bounding box of the text. The order of the points is lower left, lower
120
120
right, upper right, upper left. The points are relative to the text
121
- regardless of the angle, so "upper left" means in the top left-hand
121
+ regardless of the angle, so "upper left" means in the top left-hand
122
122
corner when you see the text horizontally.
123
123
Returns &false; on error.
124
124
</para >
158
158
<programlisting role =" php" >
159
159
<![CDATA[
160
160
<?php
161
+
161
162
// Set the content-type
162
163
header('Content-Type: image/png');
163
164
@@ -172,6 +173,7 @@ imagefilledrectangle($im, 0, 0, 399, 29, $white);
172
173
173
174
// The text to draw
174
175
$text = 'Testing...';
176
+
175
177
// Replace path by your own font path
176
178
$font = 'arial.ttf';
177
179
@@ -183,6 +185,7 @@ imagettftext($im, 20, 0, 10, 20, $black, $font, $text);
183
185
184
186
// Using imagepng() results in clearer text compared with imagejpeg()
185
187
imagepng($im);
188
+
186
189
?>
187
190
]]>
188
191
</programlisting >
0 commit comments