<<

NAME

C4::Patroncards::Lib - A shared library of linear functions used in the Patroncard Creator module in Koha

ABSTRACT

This library provides functions used by various sections of the Patroncard Creator module.

FUNCTIONS

C4::Patroncards::Lib::unpack_UTF8()

    This function returns a reference to an array of hex values equivalent to the utf8 values of the string passed in. This assumes, of course, that the string is
    indeed utf8.

    example:

        my $hex = unpack_UTF8($str);

C4::Patroncards::Lib::text_alignment()

    This function returns $Tx and $Tw values for the supplied text alignment. It accepts six parameters:

    C<origin_llx>       = the x value for the origin of the text box to align text in
    C<text_box_width>   = the width in postscript points of the text box
    C<text_llx>         = the x value for the lower left point of the text to align
    C<string_width>     = the width in postscript points of the string of text to align
    C<line>             = the line of text to align (this may be set to 'undef' for all alignment types except 'Justify')
    C<alignment>        = the type of text alignment desired:

    =item .
    B<L>        Left align
    =item .
    B<C>        Center align
    =item .
    B<R>        Right align
    =item .
    B<J>        Justify

    example:

        my ($Tx, $Tw)  = text_alignment($origin_llx, $text_box_width, $text_llx, $string_width, $line, $alignment);

C4::Patroncards::Lib::leading()

    This function accepts a single parameter, font postscript point size, and returns the amount of leading to be added.

    example:

        my $leading = leading($font_size);

C4::Patroncards::Lib::box()

    This function will create and insert a "guide box" into the supplied pdf object. It accepts five arguments:

    C<llx>      = the x value of the lower left coordinate of the guide box
    C<lly>      = the y value of the lower left coordinate of the guide box
    C<width>    = the width of the guide box
    C<height>   = the height of the guide box
    C<pdf>      = the pdf object into which to insert the guide box


    example:

        box($llx, $lly, $width, $height, $pdf);

AUTHOR

Chris Nighswonger <cnighswonger AT foundations DOT edu>

COPYRIGHT

Copyright 2009 Foundations Bible College.

LICENSE

This file is part of Koha.

Koha is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

You should have received a copy of the GNU General Public License along with Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

DISCLAIMER OF WARRANTY

Koha is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

<<