[doc-en] master: image: Fix examples and description (#5442)

From: Date: Wed, 03 Jun 2026 17:55:08 +0000
Subject: [doc-en] master: image: Fix examples and description (#5442)
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-23342@lists.php.net to get a copy of this message
Author: Mikhail Alferov (mmalferov) Committer: GitHub (web-flow) Pusher: jordikroon Date: 2026-06-03T19:55:05+02:00 Commit: https://github.com/php/doc-en/commit/d56953fc8d508615279a2220f21d7fb6c3298417 Raw diff: https://github.com/php/doc-en/commit/d56953fc8d508615279a2220f21d7fb6c3298417.diff image: Fix examples and description (#5442) * imagesetthickness.xml Fix examples * imagesetbrush.xml Fix coordinates * imagedashedline.xml Fix parameter descriptions * imagerectangle.xml Fix parameter descriptions Changed paths: M reference/image/functions/imagedashedline.xml M reference/image/functions/imagerectangle.xml M reference/image/functions/imagesetbrush.xml M reference/image/functions/imagesetthickness.xml Diff: diff --git a/reference/image/functions/imagedashedline.xml b/reference/image/functions/imagedashedline.xml index 1a684d30ecee..6194365df1e5 100644 --- a/reference/image/functions/imagedashedline.xml +++ b/reference/image/functions/imagedashedline.xml @@ -19,7 +19,7 @@ <para> This function is deprecated. Use combination of <function>imagesetstyle</function> and <function>imageline</function> - instead. + instead. 0, 0 is the top left corner of the image. </para> </refsect1> <refsect1 role="parameters"> @@ -31,7 +31,7 @@ <term><parameter>x1</parameter></term> <listitem> <para> - Upper left x coordinate. + x-coordinate of the first point. </para> </listitem> </varlistentry> @@ -39,7 +39,7 @@ <term><parameter>y1</parameter></term> <listitem> <para> - Upper left y coordinate 0, 0 is the top left corner of the image. + y-coordinate of the first point. </para> </listitem> </varlistentry> @@ -47,7 +47,7 @@ <term><parameter>x2</parameter></term> <listitem> <para> - Bottom right x coordinate. + x-coordinate of the second point. </para> </listitem> </varlistentry> @@ -55,7 +55,7 @@ <term><parameter>y2</parameter></term> <listitem> <para> - Bottom right y coordinate. + y-coordinate of the second point. </para> </listitem> </varlistentry> diff --git a/reference/image/functions/imagerectangle.xml b/reference/image/functions/imagerectangle.xml index 12bc6cf8be21..1692670177ad 100644 --- a/reference/image/functions/imagerectangle.xml +++ b/reference/image/functions/imagerectangle.xml @@ -18,7 +18,7 @@ </methodsynopsis> <para> <function>imagerectangle</function> creates a rectangle starting at - the specified coordinates. + the specified coordinates. 0, 0 is the top left corner of the image. </para> </refsect1> <refsect1 role="parameters"> @@ -38,8 +38,7 @@ <term><parameter>y1</parameter></term> <listitem> <para> - Upper left y coordinate - 0, 0 is the top left corner of the image. + Upper left y coordinate. </para> </listitem> </varlistentry> diff --git a/reference/image/functions/imagesetbrush.xml b/reference/image/functions/imagesetbrush.xml index a64df9ece62b..1380cc3a3574 100644 --- a/reference/image/functions/imagesetbrush.xml +++ b/reference/image/functions/imagesetbrush.xml @@ -84,6 +84,7 @@ <programlisting role="php"> <![CDATA[ <?php + // Load a mini php logo $php = imagecreatefrompng('./php.png'); @@ -92,7 +93,7 @@ $im = imagecreatetruecolor(100, 100); // Fill the background with white $white = imagecolorallocate($im, 255, 255, 255); -imagefilledrectangle($im, 0, 0, 299, 99, $white); +imagefilledrectangle($im, 0, 0, 99, 99, $white); // Set the brush imagesetbrush($im, $php); diff --git a/reference/image/functions/imagesetthickness.xml b/reference/image/functions/imagesetthickness.xml index 0ae74d3b7fd9..f18e087ff0b1 100644 --- a/reference/image/functions/imagesetthickness.xml +++ b/reference/image/functions/imagesetthickness.xml @@ -66,13 +66,14 @@ <programlisting role="php"> <![CDATA[ <?php + // Create a 200x100 image $im = imagecreatetruecolor(200, 100); $white = imagecolorallocate($im, 0xFF, 0xFF, 0xFF); $black = imagecolorallocate($im, 0x00, 0x00, 0x00); // Set the background to be white -imagefilledrectangle($im, 0, 0, 299, 99, $white); +imagefilledrectangle($im, 0, 0, 199, 99, $white); // Set the line thickness to 5 imagesetthickness($im, 5);

« previous php.doc.cvs (#23342) next »