Subject: | Imager::Font::Wrap doesn't count the last line length |
Date: | Fri, 5 Oct 2007 00:21:46 +1000 |
To: | bug-Imager [...] rt.cpan.org |
From: | tonyc [...] cpan.org |
(Other's email addresses obscured)
----- Forwarded message from "Eleneldil G. Arilou" <eleneldil@xxxx> -----
X-Spam-Checker-Version: SpamAssassin 3.1.7-deb (2006-10-05) on
develop-help.com
X-Spam-Level:
Date: Thu, 4 Oct 2007 18:04:32 +0400 (MSD)
From: "Eleneldil G. Arilou" <eleneldil@xxxx>
To: tony@develop-help.com
Subject: Imager::Font::Wrap doesn't count the last line length
Hi!
When I supply the savepos parameter to the wrap_text methot, the value it
saves in the specified scalar really is the total count of characters drawn
except of the last line part.
I think the problem is here:
if (length $line && !$state{full}) {
_format_line(\%state, 0, $line, 0);
}
if ($input{savepos}) {
${$input{savepos}} = $linepos;
}
The length of the trailing $line was not counted in the $linepos before and
it not here too.
---------------- ------------------
With best regards, ? ?????????? ???????????,
Eleneldil G. Arilou ??????????? ?. ??????
(Danil Lavrentyuk) (????? ?????????)
eleneldil@xxxx; ...
Show quoted text
----- End forwarded message -----