1Imager::Inline(3)     User Contributed Perl Documentation    Imager::Inline(3)
2
3
4

NAME

6       Imager::Inline - using Imager with Inline::C.
7

SYNOPSIS

9         use Inline with => 'Imager';
10         use Inline C => <<'EOS';
11         Imager some_func(Imager::Color c, Imager::Fill f) {
12           Imager img = i_img_8_new(200, 200, 3);
13           /* fill with color */
14           i_box_filled(img, 0, 0, 199, 199, c);
15           /* inner area with fill */
16           i_box_cfill(img, 50, 50, 149, 149, f);
17
18           return img;
19         }
20         EOS
21

DESCRIPTION

23       Imager hooks into Inline's "with" syntax to make it easier to write
24       Inline::C code that works with Imager, you can call Imager functions
25       without having to include headers or perform initialization.
26
27       Imager's inline "with" support does the following:
28
29       ·   add the installed Imager include directory to INC
30
31       ·   add the Imager typemap to TYPEMAPS
32
33       ·   include the headers needed by Imager C extension modules.
34
35       ·   declare and initialize the Imager API function table pointer
36
37       ·   filter the supplied code to replace Imager's class names with those
38           that Inline::C can handle.
39

LIMITATIONS

41       The filtering mechanism is global, it will replace the class names even
42       inside string constants.  If you need a string matching the name of one
43       of Imager's classes, like "Imager::Color" you will need to split it
44       into 2 to use C's string pasting mechanism, for example: "Imager:"
45       ":Color".
46

AUTHOR

48       Tony Cook <tony@imager.perl.org>
49

REVISION

51       $Revision$
52

SEE ALSO

54       Imager, Imager::ExtUtils, Imager::API, Imager::APIRef, sam‐
55       ples/inline_replace_color.pl
56
57
58
59perl v5.8.8                       2008-03-28                 Imager::Inline(3)
Impressum