Imager

 view release on metacpan or  search on metacpan

lib/Imager/APIRef.pod  view on Meta::CPAN

=item i_gsamp_bits(im, left, right, y, samples, channels, channel_count, bits)

Reads integer samples scaled to C<bits> bits of precision into the
C<unsigned int> array C<samples>.

Expect this to be slow unless C<< bits == im->bits >>.

Returns the number of samples copied, or -1 on error.

Not all image types implement this method.

Pushes errors, but does not call C<i_clear_error()>.


=for comment
From: File imext.c

=item i_gsampf(im, left, right, y, samples, channels, channel_count)


Reads floating point sample values from C<im> for the horizontal line
(left, y) to (right-1,y) for the channels specified by C<channels>, an
array of int with channel_count elements.

If C<channels> is NULL then the first C<channel_count> channels are
retrieved for each pixel.

Returns the number of samples read (which should be (C<right>-C<left>)
* C<channel_count>)


=for comment
From: File imext.c

=item i_gsampf_bg(im, l, r, y, samples, out_channels, background)


Like C<i_gsampf()> but applies the source image color over a supplied
background color.

This is intended for output to image formats that don't support alpha
channels.


=for comment
From: File paste.im

=item i_line(C<im>, C<x1>, C<y1>, C<x2>, C<y2>, C<color>, C<endp>)


=for stopwords Bresenham's

Draw a line to image using Bresenham's line drawing algorithm

   im    - image to draw to
   x1    - starting x coordinate
   y1    - starting x coordinate
   x2    - starting x coordinate
   y2    - starting x coordinate
   color - color to write to image
   endp  - endpoint flag (boolean)


=for comment
From: File draw.c

=item i_line_aa(C<im>, C<x1>, C<x2>, C<y1>, C<y2>, C<color>, C<endp>)


Anti-alias draws a line from (x1,y1) to (x2, y2) in color.

The point (x2, y2) is drawn only if C<endp> is set.


=for comment
From: File draw.c

=item i_plin(im, l, r, y, colors)


Sets (r-l) pixels starting from (l,y) using (r-l) values from
I<colors>.

Returns the number of pixels set.


=for comment
From: File imext.c

=item i_plinf(im, C<left>, C<right>, C<fcolors>)


Sets (right-left) pixels starting from (left,y) using (right-left)
floating point colors from C<fcolors>.

Returns the number of pixels set.


=for comment
From: File imext.c

=item i_poly_aa_cfill_m(im, count, x, y, mode, fill)

  i_poly_aa_cfill(im, count, x, y, mode, fill);

Fill a polygon defined by the points specified by the x and y arrays with
the fill specified by C<fill>.


=for comment
From: File polygon.c

=item i_poly_aa_m(im, count, x, y, mode, color)

  i_poly_aa_m(im, count, x, y, mode, color);

Fill a polygon defined by the points specified by the x and y arrays with
the color specified by C<color>.


=for comment



( run in 0.530 second using v1.01-cache-2.11-cpan-524268b4103 )