Re: gd function/parameters

From: Date: Sat, 29 Jul 2000 17:10:55 +0000
Subject: Re: gd function/parameters
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-26848@lists.php.net to get a copy of this message
I should probably go read the gd docs again, but the col parameter to imageline is just an integer, right? So why can't you just treat ImageSetBrush() just like ImageColorAllocate()? ie. it returns an integer which can then be fed to subsequent image* calls. Or am I missing something? -Rasmus On Fri, 28 Jul 2000, James L. Pine wrote: > a co-worker wants gdImageSetBrush in php for a project he's working on. > that was a trivial addon, but how am I supposed to wire this into the > other functions? > > imageline and other such functions are supposed to be able to be called > with 'gdBrushed' as the color parameter and use the set brush instead of a > color. so my question is: what's the preferred way to pass such a > thing from php-space? (all of the line drawing functions should be able > to take 'gdBrushed' as an arguement in place of color... there's also > 'gdStyled' and 'gdStyledBrushed' which would tie in with gdImageSetStyle) > > I can think of a few ways of doing this (just checking the type/value of > the parameter, or whatever), but I don't know what the preferred method > is. I didn't find any functions in the manual that could take either a > special value or a nonspecial value of a differing type as the same > arguement. > > thanks for any direction or insight that may follow... > > > --jlp > > >

« previous php.dev (#26848) next »