gd function/parameters
| From: | James L. Pine | Date: | Fri, 28 Jul 2000 23:15:36 +0000 |
| Subject: | gd function/parameters | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-26768@lists.php.net to get a copy of this message | ||
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