[PEPr] Comment on Images::EllipseArc

From: Date: Mon, 12 Dec 2011 09:23:59 +0000
Subject: [PEPr] Comment on Images::EllipseArc
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-54630@lists.php.net to get a copy of this message
Hi Christian, Your observation about EllipseArc being a classified function is correct. It was initially a function: it was when I tried to make it "PEAR-Ready" that I had to make it a class (I'm quite new to PHP, and every PEAR example/tutorial I saw seemed to demand the use of a class... oh well, I learnt how to use PHP classes as a result). My real intention was to write a function that was equivalent to "imagearc" and "imagefilledarc": I didn't want or need a class. I investigated using Image_Canvas prior to making EllipseArc an independent class but I felt that Image_Canvas contained too many other things that a user might not want. For example, I've drawn many shapes and often used imagearc, imagefilledarc, imagepolygon etc but have never used or needed Image_Canvas. The code for EllipseArc also seemed a bit large to squeeze into another class. This in itself is not a problem: if it has to go into Image_Canvas, then I'll do it. The "wrapper" function was mainly provided as a way to show how I originally wanted EllipseArc to be used: I wanted it to be called in the same manner as imagearc and imagefilledarc (I even arranged EllipseArc's arguments so it has a similar pattern to those two functions). -- http://pear.php.net/pepr/pepr-proposal-show.php?id=670

« previous php.pear.dev (#54630) next »