note 99260 modified in function.imagesetstyle by danbrown

From: Date: Fri, 06 Aug 2010 14:06:34 +0000
Subject: note 99260 modified in function.imagesetstyle by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-171435@lists.php.net to get a copy of this message
Be aware that styles are applied towards the width of the line instead of linear. To convert a style to be used for thick lines you can use the function below: <?php /* ImageStyleThicken(<aStyle>,<iThickness>) --> <aThickStyle> <aStyle> is the style array for a thickness of 1 (see imagesetstyle()). <iThickness> is the new thickness to apply (see imagesetthickness()). <aThickStyle> is the style array suitable for the given thickness. */ function ImageStyleThicken($_1,$_2) { $a = array(); foreach ($_1 as $x) { $i = $_2; do $a[] = $x; while (--$i>0); } return $a; } ?> --was-- Be aware that styles are applied towards the width of the line instead of linear. To convert a style to be used for thick lines you can use the function below: /* ImageStyleThicken(<aStyle>,<iThickness>) --> <aThickStyle> <aStyle> is the style array for a thickness of 1 (see imagesetstyle()). <iThickness> is the new thickness to apply (see imagesetthickness()). <aThickStyle> is the style array suitable for the given thickness. */ function ImageStyleThicken($_1,$_2) { $a = array(); foreach ($_1 as $x) { $i = $_2; do $a[] = $x; while (--$i>0); } return $a; } http://php.net/manual/en/function.imagesetstyle.php

« previous php.notes (#171435) next »