Contributions are ready for review

From: Date: Mon, 08 Dec 2014 13:00:03 +0000
Subject: Contributions are ready for review
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969385264@lists.php.net to get a copy of this message
Hello PHP EN Documentation team, There are contributions within the online editor queue for this language. Please review, then commit or delete these patches. Patches for review : ----------------------- Modified: en/faq/installation.xml By: mattficken on 2014-09-04 14:39:45 =================================================================== --- en/faq/installation.xml +++ en/faq/installation.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 334758 $ --> +<!-- $Revision: 311461 $ --> <chapter xml:id="faq.installation" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>Installation</title> <titleabbrev>Installation</titleabbrev> @@ -394,9 +394,9 @@ <function>phpinfo</function>. Near the top, there will be a listing called <literal>Configuration File (php.ini)</literal>. This will tell you where PHP is looking for &php.ini; and - whether or not it's being read. If just a directory <envar>PATH</envar> exists, + whether or not it's being read. If just a directory PATH exists, then it's not being read, and you should put your &php.ini; - in that directory. If &php.ini; is included within the <envar>PATH</envar>, + in that directory. If &php.ini; is included within the PATH, it is being read. </para> <para> @@ -413,18 +413,16 @@ <qandaentry xml:id="faq.installation.addtopath"> <question> <para> - How do I add my PHP directory to the <envar>PATH</envar> + How do I add my PHP directory to the <varname>PATH</varname> on Windows? </para> </question> <answer> <para> - On Windows NT+ and Windows Server 2000+: + On Windows 7, XP, Vista, 2008, 2012 and up <itemizedlist> <listitem><para> - Go to Control Panel and open the System icon (Start -&gt; Settings - -&gt; Control Panel -&gt; System, or just Start -&gt; Control Panel - -&gt; System for Windows XP/2003+) + Go to Control Panel and open the System icon (Start -&gt; Control Panel) </para></listitem> <listitem><para> Go to the Advanced tab @@ -450,107 +448,18 @@ </para></listitem> </itemizedlist> </para> - <para> - On Windows 98/Me you need to edit the <filename>autoexec.bat</filename> - file: - <itemizedlist> - <listitem><para> - Open the Notepad (Start -&gt; Run and enter notepad) - </para></listitem> - <listitem><para> - Open the <filename>C:autoexec.bat</filename> file - </para></listitem> - <listitem><para> - Locate the line with PATH=C:WINDOWS;C:WINDOWSCOMMAND;..... and add: - <literal>;C:php</literal> to the end of the line - </para></listitem> - <listitem><para> - Save the file and restart your computer - </para></listitem> - </itemizedlist> - </para> - <note> - <simpara> - Be sure to reboot after following the steps above to ensure that the - <envar>PATH</envar> changes are applied. - </simpara> - </note> - <para> - The PHP manual used to promote the copying of files into the Windows - system directory, this is because this directory + + <para> + The PHP manual used to promote the copying of files into the Windows + system directory, this is because this directory (<filename>C:Windows</filename>, <filename>C:WINNT</filename>, etc.) - is by default in the system's <envar>PATH</envar>. Copying files into the Windows + is by default in the systems PATH. Copying files into the Windows system directory has long since been deprecated and may cause problems. </para> </answer> </qandaentry> - <qandaentry xml:id="faq.installation.phprc"> - <question> - <para> - How do I make the &php.ini; file available to PHP on windows? - </para> - </question> - <answer> - <para> - There are several ways of doing this. If you are using Apache, read - their installation specific instructions (<link - linkend="install.windows.apache1">Apache 1</link>, <link - linkend="install.windows.apache2">Apache 2</link>), otherwise you must - set the <varname>PHPRC</varname> environment variable: - </para> - <para> - On Windows NT, 2000, XP and 2003: - <itemizedlist> - <listitem><para> - Go to Control Panel and open the System icon (Start -&gt; Settings - -&gt; Control Panel -&gt; System, or just Start -&gt; Control Panel - -&gt; System for Windows XP/2003) - </para></listitem> - <listitem><para> - Go to the Advanced tab - </para></listitem> - <listitem><para> - Click on the 'Environment Variables' button - </para></listitem> - <listitem><para> - Look into the 'System variables' pane - </para></listitem> - <listitem><para> - Click on 'New' and enter 'PHPRC' as the variable name and the - directory where &php.ini; is located as the variable value (e.g. - <literal>C:php</literal>) - </para></listitem> - <listitem><para> - Press OK and restart your computer - </para></listitem> - </itemizedlist> - </para> - <para> - On Windows 98/Me you need to edit the <filename>autoexec.bat</filename> - file: - <itemizedlist> - <listitem><para> - Open the Notepad (Start -&gt; Run and enter notepad) - </para></listitem> - <listitem><para> - Open the <filename>C:autoexec.bat</filename> file - </para></listitem> - <listitem><para> - Add a new line to the end of the file: <literal>set - PHPRC=C:php</literal> (replace <literal>C:php</literal> with the - directory where &php.ini; is located). Please note that the path - cannot contain spaces. For instance, if you have installed PHP in - <filename>C:Program FilesPHP</filename>, you would enter - <filename>C:PROGRA~1PHP</filename> instead. - </para></listitem> - <listitem><para> - Save the file and restart your computer - </para></listitem> - </itemizedlist> - </para> - </answer> - </qandaentry> + <qandaentry xml:id="faq.installation.apache.multiviews"> <question> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=57941 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=57941 ------------------------------------------------------------------ Modified: en/reference/imap/functions/imap-search.xml By: nathanb on 2014-09-15 17:19:37 =================================================================== --- en/reference/imap/functions/imap-search.xml +++ en/reference/imap/functions/imap-search.xml @@ -12,7 +12,7 @@ <methodparam><type>resource</type><parameter>imap_stream</parameter></methodparam> <methodparam><type>string</type><parameter>criteria</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>options</parameter><initializer>SE_FREE</initializer></methodparam> - <methodparam choice="opt"><type>string</type><parameter>charset</parameter><initializer>NIL</initializer></methodparam> + <methodparam choice="opt"><type>string</type><parameter>charset</parameter><initializer>NULL</initializer></methodparam> </methodsynopsis> <para> This function performs a search on the mailbox currently opened => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=58112 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=58112 ------------------------------------------------------------------ Modified: en/reference/exec/functions/escapeshellarg.xml By: Petr Hudeček on 2014-10-08 05:00:05 =================================================================== --- en/reference/exec/functions/escapeshellarg.xml +++ en/reference/exec/functions/escapeshellarg.xml @@ -22,6 +22,11 @@ include <function>exec</function>, <function>system</function> and the <link linkend="language.operators.execution">backtick operator</link>. </para> + <para> + On Windows, <function>escapeshellarg</function> instead removes percent + signs, replaces double quotes with spaces and adds double quotes around the + string. + </para> </refsect1> <refsect1 role="parameters"> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=58764 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=58764 ------------------------------------------------------------------ Modified: en/reference/mysqli/mysqli/insert-id.xml By: Kirk Bater on 2014-10-14 09:40:50 =================================================================== --- en/reference/mysqli/mysqli/insert-id.xml +++ en/reference/mysqli/mysqli/insert-id.xml @@ -10,7 +10,10 @@ <refsect1 role="description"> &reftitle.description; <para>&style.oop;</para> - <fieldsynopsis><type>mixed</type><varname linkend="mysqli.insert-id">mysqli->insert_id</varname></fieldsynopsis> + <methodsynopsis> + <type>mixed</type> + <varname linkend="mysqli.insert-id">mysqli->insert_id</varname> + </methodsynopsis> <para>&style.procedural;</para> <methodsynopsis> <type>mixed</type><methodname>mysqli_insert_id</methodname> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=58817 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=58817 ------------------------------------------------------------------ Modified: en/install/unix/apache2.xml By: ktretyak on 2014-10-15 10:43:58 =================================================================== --- en/install/unix/apache2.xml +++ en/install/unix/apache2.xml @@ -114,8 +114,8 @@ <para> Now, configure and build PHP. This is where you customize PHP with various options, like which extensions will be enabled. Run -./configure --help for a list of available options. In our example -we'll do a simple configure with Apache 2 and MySQL support. +<command>./configure --help</command> for a list of available options. In our +example we'll do a simple configure with Apache 2 and MySQL support. </para> <para> @@ -165,7 +165,8 @@ <para> You may edit your .ini file to set PHP options. If you prefer having - php.ini in another location, use --with-config-file-path=/some/path in + php.ini in another location, use + <command>--with-config-file-path=/some/path</command> in step 5. </para> @@ -181,8 +182,8 @@ <para> Edit your httpd.conf to load the PHP module. The path on the right hand side of the LoadModule statement must point to the path of the PHP - module on your system. The make install from above may have already - added this for you, but be sure to check. + module on your system. The <command>make install</command> from above + may have already added this for you, but be sure to check. </para> <example> @@ -307,7 +308,8 @@ Apache may be built multithreaded by selecting the <filename>worker</filename> MPM, rather than the standard <filename>prefork</filename> MPM, when Apache is built. This is done by - adding the following option to the argument passed to ./configure, in + adding the following option to the argument passed to + <command>./configure</command>, in step 3 above: </para> <example> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=58840 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=58840 ------------------------------------------------------------------ Modified: en/reference/curl/functions/curl-getinfo.xml By: François Bonzon on 2014-10-24 12:01:09 =================================================================== --- en/reference/curl/functions/curl-getinfo.xml +++ en/reference/curl/functions/curl-getinfo.xml @@ -81,7 +81,7 @@ </listitem> <listitem> <simpara> - <constant>CURLINFO_REDIRECT_URL</constant> - URL of final transaction, with the <constant>CURLOPT_FOLLOWLOCATION</constant> option enabled + <constant>CURLINFO_REDIRECT_URL</constant> - With the <constant>CURLOPT_FOLLOWLOCATION</constant> option disabled: redirect URL found in the last transaction, that should be requested manually next. With the <constant>CURLOPT_FOLLOWLOCATION</constant> option enabled: this is empty. The redirect URL in this case is available in <constant>CURLINFO_EFFECTIVE_URL</constant> </simpara> </listitem> <listitem> @@ -161,6 +161,11 @@ <constant>CURLINFO_CONTENT_TYPE</constant> - <literal>Content-Type:</literal> of the requested document, NULL indicates server did not send valid <literal>Content-Type:</literal> header </simpara> </listitem> + <listitem> + <simpara> + <constant>CURLINFO_PRIVATE</constant> - Private data associated with this cURL handle, previously set with the <constant>CURLOPT_PRIVATE</constant> option of <function>curl_setopt</function> + </simpara> + </listitem> </itemizedlist> </para> </listitem> @@ -313,6 +318,7 @@ </simpara> </listitem> </itemizedlist> + Note that private data is not included in the associative array and must be retrieved individually with the <constant>CURLINFO_PRIVATE</constant> option. </para> </refsect1> @@ -335,6 +341,12 @@ </entry> </row> <row> + <entry>5.2.4</entry> + <entry> + Introduced <constant>CURLINFO_PRIVATE</constant>. + </entry> + </row> + <row> <entry>5.1.3</entry> <entry> Introduced <constant>CURLINFO_HEADER_OUT</constant>. => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=58946 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=58946 ------------------------------------------------------------------ Modified: en/reference/info/functions/getopt.xml By: Jessica Rucinski on 2014-11-03 13:54:52 =================================================================== --- en/reference/info/functions/getopt.xml +++ en/reference/info/functions/getopt.xml @@ -63,8 +63,8 @@ <member>Characters followed by a colon (parameter requires value)</member> <member>Characters followed by two colons (optional value)</member> </simplelist> - Option values are the first argument after the string. It does not matter - if a value has leading white space or not. + Option values are the first argument after the string. If a value is required, + it does not matter whether the value has leading white space or not. See note. <note> <simpara> Optional values do not accept <literal>" "</literal> (space) as a separator. => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=59062 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=59062 ------------------------------------------------------------------ Modified: en/reference/imagick/imagick/compositeimage.xml By: anonymous on 2014-11-05 12:20:22 =================================================================== --- en/reference/imagick/imagick/compositeimage.xml +++ en/reference/imagick/imagick/compositeimage.xml @@ -17,7 +17,7 @@ <methodparam choice="opt"><type>int</type><parameter>channel</parameter><initializer>Imagick::CHANNEL_ALL</initializer></methodparam> </methodsynopsis> <para> - Composite one image onto another at the specified offset. + Composite one image onto another at the specified offset. Any extra arguments that need to be passed to the compose algorithm should be done by calling setImageArtifact with 'compose:args' as the first parameter, with the data in the second parameter. </para> </refsect1> @@ -81,6 +81,37 @@ </para> </refsect1> + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Using <function>Imagick::compositeImage</function>:</title> + <para> + Composite two images with the 'mathematics' compose method + </para> + <programlisting role="php"> +<![CDATA[ +<?php + +// Equivalent to running the command +// convert src1.png src2.png -compose mathematics -define compose:args="1,0,-0.5,0.5" -composite output.png + +$src1 = new Imagick("./src1.png"); +$src2 = new Imagick("./src2.png"); + +$src1->setImageVirtualPixelMethod(Imagick::VIRTUALPIXELMETHOD_TRANSPARENT); +$src1->setImageArtifact('compose:args', "1,0,-0.5,0.5"); +$src1->compositeImage($src2, Imagick::COMPOSITE_MATHEMATICS, 0, 0); +$src1->writeImage("./output.png"); + +?> +]]> + </programlisting> + </example> + </para> + </refsect1> + + </refentry> <!-- Keep this comment at the end of the file => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=59072 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=59072 ------------------------------------------------------------------ Modified: en/reference/filesystem/functions/fread.xml By: Stefan Topfstedt on 2014-11-20 13:00:41 =================================================================== --- en/reference/filesystem/functions/fread.xml +++ en/reference/filesystem/functions/fread.xml @@ -143,7 +143,12 @@ <![CDATA[ <?php $handle = fopen("http://www.example.com/", "rb"); +if (FALSE === $handle) { + die("Failed to open stream to URL"); +} + $contents = ''; + while (!feof($handle)) { $contents .= fread($handle, 8192); } => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=59188 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=59188 ------------------------------------------------------------------ Modified: en/reference/pthreads/threaded/merge.xml By: Krzysiek Łukasiak on 2014-11-25 03:44:27 =================================================================== --- en/reference/pthreads/threaded/merge.xml +++ en/reference/pthreads/threaded/merge.xml @@ -1,134 +1,135 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 334955 $ --> - -<refentry xml:id="threaded.merge" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> - <refnamediv> - <refname>Threaded::merge</refname> - <refpurpose>Manipulation</refpurpose> - </refnamediv> - - <refsect1 role="description"> - &reftitle.description; - <methodsynopsis> - <modifier>public</modifier> <type>boolean</type><methodname>Threaded::merge</methodname> - <methodparam><type>mixed</type><parameter>from</parameter></methodparam> - <methodparam choice="opt"><type>mixed</type><parameter>overwrite</parameter></methodparam> - </methodsynopsis> - <para> - Merges data into the current object - </para> - </refsect1> - - <refsect1 role="parameters"> - &reftitle.parameters; - <variablelist> - <varlistentry> - <term><parameter>from</parameter></term> - <listitem> - <para> - The data to merge - </para> - </listitem> - </varlistentry> - <varlistentry> - <term><parameter>overwrite</parameter></term> - <listitem> - <para> - Overwrite existing keys, by default true - </para> - </listitem> - </varlistentry> - </variablelist> - </refsect1> - - <refsect1 role="returnvalues"> - &reftitle.returnvalues; - <para> - A boolean indication of success - </para> - </refsect1> - - <refsect1 role="examples"> - &reftitle.examples; - <para> - <example> - <title>Merging into the property table of a threaded object</title> - <programlisting role="php"> -<![CDATA[ -<?php -$array = []; - -while (count($array) < 10) - $array[] = count($array); - -$stdClass = new stdClass(); -$stdClass->foo = "foo"; -$stdClass->bar = "bar"; -$stdClass->baz = "baz"; - -$safe = new Threaded(); -$safe->merge($array); -$safe->merge($stdClass); - -var_dump($safe); -?> -]]> - </programlisting> - &example.outputs; - <screen> -<![CDATA[ -object(Threaded)#2 (13) { - ["0"]=> - int(0) - ["1"]=> - int(1) - ["2"]=> - int(2) - ["3"]=> - int(3) - ["4"]=> - int(4) - ["5"]=> - int(5) - ["6"]=> - int(6) - ["7"]=> - int(7) - ["8"]=> - int(8) - ["9"]=> - int(9) - ["foo"]=> - string(3) "foo" - ["bar"]=> - string(3) "bar" - ["baz"]=> - string(3) "baz" -} -]]> - </screen> - </example> - </para> - </refsect1> -</refentry> - -<!-- Keep this comment at the end of the file -Local variables: -mode: sgml -sgml-omittag:t -sgml-shorttag:t -sgml-minimize-attributes:nil -sgml-always-quote-attributes:t -sgml-indent-step:1 -sgml-indent-data:t -indent-tabs-mode:nil -sgml-parent-document:nil -sgml-default-dtd-file:"~/.phpdoc/manual.ced" -sgml-exposed-tags:nil -sgml-local-catalogs:nil -sgml-local-ecat-files:nil -End: -vim600: syn=xml fen fdm=syntax fdl=2 si -vim: et tw=78 syn=sgml -vi: ts=1 sw=1 ---> +<?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 334955 $ --> + +<refentry xml:id="threaded.merge" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> + <refnamediv> + <refname>Threaded::merge</refname> + <refpurpose>Manipulation</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <modifier>public</modifier> <type>boolean</type><methodname>Threaded::merge</methodname> + <methodparam><type>mixed</type><parameter>from</parameter></methodparam> + <methodparam choice="opt"><type>bool</type><parameter>overwrite</parameter></methodparam> + </methodsynopsis> + <para> + Merges data into the current object + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <variablelist> + <varlistentry> + <term><parameter>from</parameter></term> + <listitem> + <para> + The data to merge + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>overwrite</parameter></term> + <listitem> + <para> + Overwrite existing keys, by default true + </para> + </listitem> + </varlistentry> + </variablelist> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + A boolean indication of success + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Merging into the property table of a threaded object</title> + <programlisting role="php"> +<![CDATA[ +<?php +$array = []; + +while (count($array) < 10) + $array[] = count($array); + +$stdClass = new stdClass(); +$stdClass->foo = "foo"; +$stdClass->bar = "bar"; +$stdClass->baz = "baz"; + +$safe = new Threaded(); +$safe->merge($array); +$safe->foo = "bar"; +$safe->merge($stdClass, false); + +var_dump($safe); +?> +]]> + </programlisting> + &example.outputs; + <screen> +<![CDATA[ +object(Threaded)#2 (13) { + ["0"]=> + int(0) + ["1"]=> + int(1) + ["2"]=> + int(2) + ["3"]=> + int(3) + ["4"]=> + int(4) + ["5"]=> + int(5) + ["6"]=> + int(6) + ["7"]=> + int(7) + ["8"]=> + int(8) + ["9"]=> + int(9) + ["foo"]=> + string(3) "bar" + ["bar"]=> + string(3) "bar" + ["baz"]=> + string(3) "baz" +} +]]> + </screen> + </example> + </para> + </refsect1> +</refentry> + +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"~/.phpdoc/manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=59207 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=59207 ------------------------------------------------------------------ Modified: en/reference/imagick/imagickdraw/pathcurvetoquadraticbeziersmoothabsolute.xml By: anonymous on 2014-12-07 11:04:33 =================================================================== --- en/reference/imagick/imagickdraw/pathcurvetoquadraticbeziersmoothabsolute.xml +++ en/reference/imagick/imagickdraw/pathcurvetoquadraticbeziersmoothabsolute.xml @@ -5,7 +5,7 @@ <refname>ImagickDraw::pathCurveToQuadraticBezierSmoothAbsolute</refname> <refpurpose>Draws a quadratic Bezier curve</refpurpose> </refnamediv> - + <refsect1 role="description"> &reftitle.description; <methodsynopsis> @@ -13,7 +13,7 @@ <methodparam><type>float</type><parameter>x</parameter></methodparam> <methodparam><type>float</type><parameter>y</parameter></methodparam> </methodsynopsis> - &warn.undocumented.func; + <para> Draws a quadratic Bezier curve (using absolute coordinates) from the current point to (x,y). The control point is assumed to be the reflection @@ -26,8 +26,12 @@ coincident with the current point.). At the end of the command, the new current point becomes the final (x,y) coordinate pair used in the polybezier. </para> + + <para> + This function cannot be used to continue a cubic Bezier curve smoothly. It can only continue from a quadratic curve smoothly. + </para> </refsect1> - + <refsect1 role="parameters"> &reftitle.parameters; <para> @@ -50,7 +54,7 @@ </varlistentry> </variablelist> </para> - + </refsect1> <refsect1 role="returnvalues"> &reftitle.returnvalues; @@ -58,7 +62,65 @@ &return.void; </para> </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title><function>ImagickDraw::pathCurveToQuadraticBezierSmoothAbsolute</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +$draw = new ImagickDraw(); + +$draw->setStrokeOpacity(1); +$draw->setStrokeColor("black"); +$draw->setFillColor("blue"); + +$draw->setStrokeWidth(2); +$draw->setFontSize(72); + +$draw->pathStart(); +$draw->pathMoveToAbsolute(50,250); +// This specifies a quadratic bezier curve with the current position as the start +// point, the control point is the first two params, and the end point is the last two params. +$draw->pathCurveToQuadraticBezierAbsolute( + 150,50, + 250,250 +); + +// This specifies a quadratic bezier curve with the current position as the start +// point, the control point is mirrored from the previous curves control point +// and the end point is defined by the x, y values. +$draw->pathCurveToQuadraticBezierSmoothAbsolute( + 450,250 +); + +// This specifies a quadratic bezier curve with the current position as the start +// point, the control point is mirrored from the previous curves control point +// and the end point is defined relative from the current position by the x, y values. +$draw->pathCurveToQuadraticBezierSmoothRelative( + 200,-100 +); + +$draw->pathFinish(); + +$imagick = new Imagick(); +$imagick->newImage(700, 500, $backgroundColor); +$imagick->setImageFormat("png"); + +$imagick->drawImage($draw); + +header("Content-Type: image/png"); +echo $imagick->getImageBlob(); +?> +]]> + </programlisting> + </example> + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=59276 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=59276 ------------------------------------------------------------------ Modified: en/reference/imagick/imagickdraw/pathcurvetoquadraticbeziersmoothrelative.xml By: anonymous on 2014-12-07 11:06:43 =================================================================== --- en/reference/imagick/imagickdraw/pathcurvetoquadraticbeziersmoothrelative.xml +++ en/reference/imagick/imagickdraw/pathcurvetoquadraticbeziersmoothrelative.xml @@ -27,6 +27,10 @@ current point becomes the final (x, y) coordinate pair used in the polybezier. </para> + + <para> + This function cannot be used to continue a cubic Bezier curve smoothly. It can only continue from a quadratic curve smoothly. + </para> </refsect1> <refsect1 role="parameters"> @@ -59,6 +63,64 @@ &return.void; </para> </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title><function>ImagickDraw::pathCurveToQuadraticBezierSmoothRelative</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +$draw = new ImagickDraw(); + +$draw->setStrokeOpacity(1); +$draw->setStrokeColor("black"); +$draw->setFillColor("blue"); + +$draw->setStrokeWidth(2); +$draw->setFontSize(72); + +$draw->pathStart(); +$draw->pathMoveToAbsolute(50,250); + +// This specifies a quadratic bezier curve with the current position as the start +// point, the control point is the first two params, and the end point is the last two params. +$draw->pathCurveToQuadraticBezierAbsolute( + 150,50, + 250,250 +); + +// This specifies a quadratic bezier curve with the current position as the start +// point, the control point is mirrored from the previous curves control point +// and the end point is defined by the x, y values. +$draw->pathCurveToQuadraticBezierSmoothAbsolute( + 450,250 +); + +// This specifies a quadratic bezier curve with the current position as the start +// point, the control point is mirrored from the previous curves control point +// and the end point is defined relative from the current position by the x, y values. +$draw->pathCurveToQuadraticBezierSmoothRelative( + 200,-100 +); + +$draw->pathFinish(); + +$imagick = new Imagick(); +$imagick->newImage(700, 500, $backgroundColor); +$imagick->setImageFormat("png"); + +$imagick->drawImage($draw); + +header("Content-Type: image/png"); +echo $imagick->getImageBlob(); +?> +]]> + </programlisting> + </example> + </para> + </refsect1> </refentry> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=59278 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=59278 ------------------------------------------------------------------ -- https://edit.php.net/ This email is send automatically by the Php Docbook Online Editor.

« previous php.doc (#969385264) next »