reference/image/functions/imageftbbox.xml
593ea510e853ff034e03f78a4be0daa41661c9d4
...
...
@@ -1,6 +1,6 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
-
<refentry xml:id='function.imageftbbox' xmlns="http://docbook.org/ns/docbook">
3
+
<refentry xml:id="function.imageftbbox" xmlns="http://docbook.org/ns/docbook">
4
4
<refnamediv>
5
5
<refname>imageftbbox</refname>
6
6
<refpurpose>Give the bounding box of a text using fonts via freetype2</refpurpose>
...
...
@@ -8,17 +8,25 @@
8
8
<refsect1 role="description">
9
9
&reftitle.description;
10
10
<methodsynopsis>
11
-
<type>array</type><methodname>imageftbbox</methodname>
11
+
<type class="union"><type>array</type><type>false</type></type><methodname>imageftbbox</methodname>
12
12
<methodparam><type>float</type><parameter>size</parameter></methodparam>
13
13
<methodparam><type>float</type><parameter>angle</parameter></methodparam>
14
-
<methodparam><type>string</type><parameter>fontfile</parameter></methodparam>
15
-
<methodparam><type>string</type><parameter>text</parameter></methodparam>
16
-
<methodparam choice="opt"><type>array</type><parameter>extrainfo</parameter></methodparam>
14
+
<methodparam><type>string</type><parameter>font_filename</parameter></methodparam>
15
+
<methodparam><type>string</type><parameter>string</parameter></methodparam>
16
+
<methodparam choice="opt"><type>array</type><parameter>options</parameter><initializer>[]</initializer></methodparam>
17
17
</methodsynopsis>
18
18
<para>
19
19
This function calculates and returns the bounding box in pixels
20
20
for a FreeType text.
21
21
</para>
22
+
<note>
23
+
<para>
24
+
Prior to PHP 8.0.0, <function>imageftbbox</function> was an extended variant of
25
+
<function>imagettfbbox</function> which additionally supported the
26
+
<parameter>options</parameter>.
27
+
As of PHP 8.0.0, <function>imagettfbbox</function> is an alias of <function>imageftbbox</function>.
28
+
</para>
29
+
</note>
22
30
</refsect1>
23
31
<refsect1 role="parameters">
24
32
&reftitle.parameters;
...
...
@@ -34,13 +42,13 @@
34
42
<term><parameter>angle</parameter></term>
35
43
<listitem>
36
44
<para>
37
-
Angle in degrees in which <parameter>text</parameter> will be
45
+
Angle in degrees in which <parameter>string</parameter> will be
38
46
measured.
39
47
</para>
40
48
</listitem>
41
49
</varlistentry>
42
50
<varlistentry>
43
-
<term><parameter>fontfile</parameter></term>
51
+
<term><parameter>font_filename</parameter></term>
44
52
<listitem>
45
53
<para>
46
54
The name of the TrueType font file (can be a URL). Depending on
...
...
@@ -51,7 +59,7 @@
51
59
</listitem>
52
60
</varlistentry>
53
61
<varlistentry>
54
-
<term><parameter>text</parameter></term>
62
+
<term><parameter>string</parameter></term>
55
63
<listitem>
56
64
<para>
57
65
The string to be measured.
...
...
@@ -59,11 +67,11 @@
59
67
</listitem>
60
68
</varlistentry>
61
69
<varlistentry>
62
-
<term><parameter>extrainfo</parameter></term>
70
+
<term><parameter>options</parameter></term>
63
71
<listitem>
64
72
<para>
65
73
<table>
66
-
<title>Possible array indexes for <parameter>extrainfo</parameter></title>
74
+
<title>Possible array indexes for <parameter>options</parameter></title>
67
75
<tgroup cols="2">
68
76
<thead>
69
77
<row>
...
...
@@ -137,6 +145,9 @@
137
145
<parameter>angle</parameter>, so "upper left" means in the top left-hand
138
146
corner seeing the text horizontally.
139
147
</para>
148
+
<para>
149
+
On failure, &false; is returned.
150
+
</para>
140
151
</refsect1>
141
152
<refsect1 role="examples">
142
153
&reftitle.examples;
...
...
@@ -179,34 +190,17 @@ imagedestroy($im);
179
190
</refsect1>
180
191
<refsect1 role="notes">
181
192
&reftitle.notes;
182
-
&note.gd.2;
183
193
&note.freetype;
184
194
</refsect1>
185
-
<refsect1 role="changelog">
186
-
&reftitle.changelog;
187
-
<para>
188
-
<informaltable>
189
-
<tgroup cols="2">
190
-
<thead>
191
-
<row>
192
-
<entry>&Version;</entry>
193
-
<entry>&Description;</entry>
194
-
</row>
195
-
</thead>
196
-
<tbody>
197
-
<row>
198
-
<entry>4.3.5</entry>
199
-
<entry>
200
-
<parameter>extrainfo</parameter> was made optional.
201
-
</entry>
202
-
</row>
203
-
</tbody>
204
-
</tgroup>
205
-
</informaltable>
206
-
</para>
195
+

196
+
<refsect1 role="seealso">
197
+
&reftitle.seealso;
198
+
<simplelist>
199
+
<member><function>imagefttext</function></member>
200
+
<member><function>imagettfbbox</function></member>
201
+
</simplelist>
207
202
</refsect1>
208
203
</refentry>
209
-

210
204
<!-- Keep this comment at the end of the file
211
205
Local variables:
212
206
mode: sgml
213
207