Imager::Inline(3pm)
π NAME π
okay bestie, this is the Imager::Inline(3pm) page from the User Contributed Perl Documentation β it's literally Imager::Inline: using Imager with Inline::C. π«Ά
β¨ SYNOPSIS β¨
like, here's the whole vibe:
use Inline with => 'Imager';
use Inline C => <<'EOS';
Imager some_func(Imager::Color c, Imager::Fill f) {
Imager img = i_img_8_new(200, 200, 3);
/* fill with color */
i_box_filled(img, 0, 0, 199, 199, c);
/* inner area with fill */
i_box_cfill(img, 50, 50, 149, 149, f);
return img;
}
EOS
πΈ DESCRIPTION πΈ
So Imager hooks into Inline's with syntax to make it easier to write Inline::C code that works with Imager β you can call Imager functions without having to include headers or perform initialization. β¨
Imager's Inline with support does the following:
- add the installed Imager include directory to
INC - add the Imager typemap to
TYPEMAPS - include the headers needed by Imager C extension modules.
- declare and initialize the Imager API function table pointer
- filter the supplied code to replace Imager's class names with those that
Inline::Ccan handle.
π¦ LIMITATIONS π¦
heads up, bestie β the filtering mechanism is global. It will replace the class names even inside string constants. π
If you need a string matching the name of one of Imager's classes, like Imager::Color, you will need to split it into 2 to use C's string pasting mechanism, for example: "Imager:" ":Color".
π AUTHOR π
Tony Cook <tonyc@cpan.org> β icon behavior. π
π REVISION π
$Revision$
π SEE ALSO π
go peek at these, bestie:
ImagerImager::ExtUtilsImager::APIImager::APIRefsamples/inline_replace_color.pl
and that's the whole page, bestie: source/version perl v5.42.3, dated 2026-08-19, and it's Imager::Inline(3pm) β mwah π
π¦ where this page comes from
- ubuntu stonking: libimager-perl 1.035+dfsg-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms