Subject: | Re: endW returning |
Date: | Tue, 2 Aug 2011 11:05:26 +0200 |
To: | "bug-PDF-TextBlock [...] rt.cpan.org" <bug-PDF-TextBlock [...] rt.cpan.org> |
From: | André Steenbergen <asteenbergen [...] cleafs.nl> |
Sorry, I accidentally removed 1 line.
On 08/02/11 10:51, André Steenbergen wrote:
Show quoted text
> When invoking apply, I would really appreciate endw returning the
> right edge of the textblock (thus maxWidth). If I understand it
> correctly. I changed the code locally to this: For readability sake I
> have not made the if loop a one-liner.
>
> .....lots of code
> if ($word =~ /\/href/) {
> undef $href;
> }
> unless ($href) {
> $current_content_text = $content_texts{default};
> }
> }
> }
> if ($align eq 'justify') {
> $endw = $self->w;
> } else {
> $endw = $line_width if !$endw || ($line_width > $endw);
> }
> } else {
> # calculate the left hand position of the line
> if ( $align eq 'right' ) {
> $xpos += $self->w - $line_width;
> } elsif ( $align eq 'center' ) {
> $xpos += ( $self->w / 2 ) - ( $line_width / 2 );
> }
> # render the line
> $debug && _debug("default 2", $xpos, $ypos, @line);
> $content_text->translate( $xpos, $ypos );
>
> $content_texts{default}->text( join( ' ', @line ) );
> $endw = $line_width if !$endw || ($line_width > $endw);
>
>
> }
> $ypos -= $self->lead;
> $first_line = 0;
> }
> .....lots of code
>
>
> --
>
> André Steenbergen
> Programmeur
> /Tomorrow like any given day is the first day of the rest of your life./
>
> Oude Boteringestraat 60 | 9712 GM Groningen
> T: 050-52.00.980 | F: 050-311.07.03
> E: asteenbergen@cleafs.nl <mailto:asteenbergen@cleafs.nl>
> W: www.cleafs.nl <http://www.cleafs.nl/> | www.cleafs.com
> <http://www.cleafs.com/> | www.cleafs.de <http://www.cleafs.de/> |
> www.cleafs.es <http://www.cleafs.es/>
>
> This e-mail message may contain confidential information. If you are not
> the intended recipient, any use, dissemination, distribution or copying of
> this e-mail message is strictly prohibited. If you have received this
> message in error, please immediately notify the sender and delete this
> e-mail message from your computer. The information contained in this
> e-mail message does not constitute a distribution, an offer to sell or the
> solicitation of an offer to buy any securities in any jurisdiction.
>
> Cleafs is registered in the Netherlands,
> BTW-Nummer: NL8177.81.389.B.01. KVK-Nummer: 02098043.
> Its principal place of business and registered office is
> Oude Boteringestraat 60 9712 GM Groningen, The Netherlands.
>
--
André Steenbergen
Programmeur
/Tomorrow like any given day is the first day of the rest of your life./
Oude Boteringestraat 60 | 9712 GM Groningen
T: 050-52.00.980 | F: 050-311.07.03
E: asteenbergen@cleafs.nl <mailto:asteenbergen@cleafs.nl>
W: www.cleafs.nl <http://www.cleafs.nl/> | www.cleafs.com
<http://www.cleafs.com/> | www.cleafs.de <http://www.cleafs.de/> |
www.cleafs.es <http://www.cleafs.es/>
This e-mail message may contain confidential information. If you are not
the intended recipient, any use, dissemination, distribution or copying of
this e-mail message is strictly prohibited. If you have received this
message in error, please immediately notify the sender and delete this
e-mail message from your computer. The information contained in this
e-mail message does not constitute a distribution, an offer to sell or the
solicitation of an offer to buy any securities in any jurisdiction.
Cleafs is registered in the Netherlands,
BTW-Nummer: NL8177.81.389.B.01. KVK-Nummer: 02098043.
Its principal place of business and registered office is
Oude Boteringestraat 60 9712 GM Groningen, The Netherlands.