The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Image::BoxModel::Text - Text functions for Image::BoxModel

SYNOPSIS

  For an example and general information see Image::BoxModel.pm

DESCRIPTION

Image::BoxModel::Text implements direct inserting of text. It has the following method which a Image::BoxModel object inherit.

It uses Image::BoxModel::Lowlevel for defining boxes and drawing text. See there for more information.

Method

Annotate

 $image -> Annotate (
        text => $text                                   #mandatory
        position => [top|bottom|right|left],
        textsize => $size,
        font => $font,
        rotate => [in degrees, may be negative as well],
        align => [Center|Left|Right],                   #align is how multiline-text is aligned
        text_position => [Center                        #position is how text will be positioned inside its box
                        NorthWest|
                        North|
                        NorthEast|
                        West|
                        SoutEast|
                        South|
                        SouthWest|
                        West],
        background => (color),
        padding_right => [number],
        padding_left => [number],
        padding_top => [number],
        padding_bottom=> [number],
 )

All parameters except "text" are preset with defaults. These are the first value above or generally "0" for numbers (except "20" for textsize), and "white" for colors.