Re: Re: [PEPr] +1 for Images::XBM

From: Date: Wed, 02 Mar 2005 17:21:10 +0000
Subject: Re: Re: [PEPr] +1 for Images::XBM
References: 1 2 3 4  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-36476@lists.php.net to get a copy of this message
On Wed, 02 Mar 2005 11:33:04 -0500, Philippe Jausions <Philippe.Jausions@11abacus.com> wrote: > Evgeny Stepanischev wrote: > > >PJ> Philippe Jausions (http://pear.php.net/user/jausions) has > >PJ> voted +1 on the proposal for Images::XBM. > > > >PJ> This vote is conditional. The condition is: > > > >PJ> - Most methods name start with "image". I would recommend to > >PJ> drop that. It just take longer to type. > >PJ> - Some method name change recommendation > >PJ> + imageSX -> getWidth > >PJ> + imageSY -> getHeight > >PJ> + imageLine -> drawLine (and the like drawRectangle, drawEllipse...) > >PJ> + imageSetPixel -> setPixel (or drawPixel for consistency) > >PJ> + imageColorAt -> getColorAt > >PJ> + imageXBM -> output > >PJ> + imageCreateFromXBM -> createFromFile > >Names of methods coincide with GD module names. > >So it will be easier to user than them to remember. > > > > > Ok, I see your point. However, when/if GD extension gets a OO > implementaion, I doubt that it will keep the "image" prefix used in > procedural context... I won't hold it against you ;-) > > Unless a lot of people wish to see the name changes I proposed, don't > bother changing them for now then... > I agree with Phillipe. It doesn't make sense to include the "image" prefix in these functions. Just because this is the way GD does it doesn't mean we have to do it that way.I would much rather our implementation(s) have useful names instead of throwbacks to the non-OO way of doing things. $image->image* just reiterates the namespace, it has no real value. I also agree with the funciton renamings he suggested (getWidth, getHeight, etc). -- Justin Patrin

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