note 91779 deleted from function.imagickdraw-line by danbrown

From: Date: Thu, 25 Jun 2009 13:04:20 +0000
Subject: note 91779 deleted from function.imagickdraw-line by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-157493@lists.php.net to get a copy of this message
Note Submitter: Peter "the Pete" de Pijd ---- There is a small imprecision in the previous user note. You have to think of your canvas as 2D matrix, starting with x/y = 0/0. So the calculation of the midpoint is wrong. It must be = ($width - 1) / 2 and *not* just $width / 2. Imagine a 3x3 image, the midpoint is obviously 1/1. So you should prefer odd width/height values, if you operate with a midpoint (chart pie, ..) and an odd stroke width (f.e. "1"). Otherwise a line with a stroke width of "1" ends in a 2-pixel, alpha 0.5 line.

« previous php.notes (#157493) next »