Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    Imager::DTP::Letter 0.06

    Download button

    No screenshots available
    Downloads: 357  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    Poor (1.6/5)
    11 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Toshimasa Ishibashi | More programs
    Perl Artistic License / FREE
    April 25th, 2008, 01:03 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Imager::DTP::Letter description

    Imager::DTP::Letter is a letter handling module for Imager::DTP package.

    Imager::DTP::Letter is a letter handling module for Imager::DTP package.

    SYNOPSIS

    use Imager::DTP::Letter;

    # first, define font & letter string
    my $font = Imager::Font->new(file=>'path/to/foo.ttf',type=>'ft2',
    size=>16,color=>'#000000',aa=>1);
    my $text = 'A';

    # create instance - basic way
    my $ltr = Imager::DTP::Letter->new();
    $ltr->setText(text=>$text); # set text
    $ltr->setFont(font=>$font); # set font
    $ltr->setScale(x=>1.2,y=>0.5); # set transform scale (optional)

    # create instance - or the shorcut way
    my $ltr = Imager::DTP::Letter->new(text=>$text,font=>$font,
    xscale=>1.2,yscale=>0.5);

    # draw letter on target image
    my $target = Imager->new(xsize=>50,ysize=>50);
    $target->box(filled=>1,color=>'#FFFFFF'); # with white background
    $ltr->draw(target=>$target,x=>10,y=>10);

    # and write out image to file
    $target->write(file=>'result.jpg',type=>'jpeg');

    Imager::DTP::Letter is a module intended for handling each letter/character in a whole text string (sentence or paragraph). Each Imager::DTP::Letter instance will hold one letter/character internally, and it holds various information about the letter/character, most of it aquired from Imager::Font->bounding_box() method. Thus, Imager::DTP::Letter is intended to act as a single letter with font information (such as ascent/descent) bundled together. It is allowed to set more than one letter/character to a single Imager::DTP::Letter instance, but still, the whole Imager::DTP package will handle the instance as 'single letter'.

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    Imager::DTP letter | letter handling | Perl module | Imager::DTP | letter | handling

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM