Templat...onstants(3)
π NAME π
Template::Plugin::GD::Constants β Interface to GD module constants. Bestie, youβre on the Templat...onstants(3) page from the User Contributed Perl Documentation section, and itβs giving βsmall Perl module, big GD energyβ β¨π
β¨ SYNOPSIS β¨
Okay so the synopsis is literally this, and yes you can use it like this:
[% USE gdc = GD.Constants %]
# --> the constants gdc.gdBrushed, gdc.gdSmallFont, gdc.GD_CMP_IMAGE
# are now available
Translation: the constants gdc.gdBrushed, gdc.gdSmallFont, and gdc.GD_CMP_IMAGE are now available. Slay π
π EXAMPLES π
Hereβs the example, copied with love and zero edits:
[% FILTER null;
USE gdc = GD.Constants;
USE im = GD.Image(200,100);
black = im.colorAllocate(0 ,0, 0);
red = im.colorAllocate(255,0, 0);
r = im.string(gdc.gdLargeFont, 10, 10, "Large Red Text", red);
im.png | stdout(1);
END;
-%]
Not the gdc.gdLargeFont cameo π₯ iconic behavior.
π¦ DESCRIPTION π¦
The GD.Constants plugin gives you access to the various GD moduleβs constants β think gdBrushed, gdSmallFont, gdTransparent, GD_CMP_IMAGE etc. constants everywhere, no cap π«
When GD.pm is used in perl, it exports various contstants into the callerβs namespace. Yes, βcontstants,β weβre keeping it moving π This plugin makes those exported constants available as template variables.
See Template::Plugin::GD::Image and GD for further examples and details. Go check them out, bestie π«Ά
πΈ AUTHOR πΈ
- Thomas Boutell wrote the GD graphics library.
- Lincoln D. Stein wrote the Perl GD modules that interface to it.
Craig Barratt <craig@arraycomm.com>wrote the original GD plugins for the Template Toolkit (2001).Andy Wardley <abw@cpan.org>extracted them from the TT core into a separate distribution for TT version 2.15.
Author lore unlocked πβ¨
π COPYRIGHT π
Copyright (C) 2001 Craig Barratt <craig@arraycomm.com>, 2006 Andy Wardley <abw@cpan.org>.
The GD.pm interface is copyright 1995-2000, Lincoln D. Stein.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. Periodt π
π SEE ALSO π
Go check out Template::Plugin::GD, Template::Plugin::GD::Image, and GD β iykyk π
byeee bestie π«Ά this page came from perl v5.42.0, dated 2017-10-08. mwah π
π¦ where this page comes from
- opensuse-leap 16.0: perl-Template-GD 2.66-bp160.1.11 Β· Artistic-1.0 or GPL-1.0+
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms