Puneet,
You are exactly correct. The code generator has a few functions where
it pluralizes a function name to indicate that it will operate on
piddles of the required args.
I just did some quick tests in the perldl shell to verify that this
does indeed work, and it does indeed work.
When I did the test, the color I used was not a piddle (ie it was a
simple perl scalar, with the index of the color that was allocated for
that gdImage). This worked due to some of the PDL::PP or threading magic
that David was mentioning earlier.
-Judd
On Tue, 2010-04-20 at 00:09 -0500, P Kishor wrote:
> Hi Judd,
>
> I am looking for documentation on $image->SetPixels( $x(pdl), $y(pdl),
> $color(pdl) ) and other related commands such as
> $image->FilledRectangles( $x1(pdl), $y1(pdl), $x2(pdl), $y2(pdl),
> $color(pdl) ). Your instructions say that these are aliases for
> commands in the GD library that start with 'gdImage', but there is no
> gdImageSetPixels in GD. I am assuming the pluralized version sets
> pixels at the points represented by the entire piddles, but I can't
> grok the usage/syntax for this.
>
> what is $x(pdl)? Is that a 1D pdl of all the x coords in the image,
> essentially a list of x coords? I have gone through the source code of
> your module, and I don't see anything except the following --
>
> # Allow operation on these member function on piddles as well:
> #int gdImageGetPixel (gdImagePtr im, int x, int y);
> generate_pp_def_members( <<'ENDMEMBERS' );
> ..
> void gdImageSetPixel (gdImagePtr im, int x, int y, int color);
> ..
> void gdImageFilledRectangle (gdImagePtr im, int x1, int y1, int x2,
> int y2, int color);
> ..
> ENDMEMBERS
>
--
____________________________
Judd Taylor
Software Engineer
Orbital Systems, Ltd.
3807 Carbon Rd.
Irving, TX 75038-3415
[email protected]
(972) 915-3669 x127
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl