From c16aa22dc0946e7767b4651b7c890bb79391bcaf Mon Sep 17 00:00:00 2001 From: David Warring Date: Sun, 8 Dec 2024 08:13:17 +1300 Subject: [PATCH] More text-lione documentation --- docs/PDF/Content/Text/Line.md | 12 ++++++++++-- lib/PDF/Content/Text/Box.rakumod | 1 - lib/PDF/Content/Text/Line.rakumod | 12 ++++++++++-- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/docs/PDF/Content/Text/Line.md b/docs/PDF/Content/Text/Line.md index 089fdf4..0762d37 100644 --- a/docs/PDF/Content/Text/Line.md +++ b/docs/PDF/Content/Text/Line.md @@ -17,9 +17,13 @@ This class represents a single line of output in a [PDF::Content::Text::Box](htt Methods ------- +### method text + +Return the input text for the line. + ### method decoded -An input list of text atoms +Return a list of input text atoms ### method encoded @@ -39,5 +43,9 @@ indentation offset. ### method align -Alignment offset +Alignment offset. + +### method content-width + +Return the width of rendered content. diff --git a/lib/PDF/Content/Text/Box.rakumod b/lib/PDF/Content/Text/Box.rakumod index a53ab67..02626bd 100644 --- a/lib/PDF/Content/Text/Box.rakumod +++ b/lib/PDF/Content/Text/Box.rakumod @@ -299,7 +299,6 @@ method !layup(@atoms is copy) { @!images.push( { :$Tx, :$Ty, :xobject($atom) } ) } - if $prev-soft-hyphen { # Drop soft hyphen when line is continued $line.decoded.pop; diff --git a/lib/PDF/Content/Text/Line.rakumod b/lib/PDF/Content/Text/Line.rakumod index d68f645..cc812e8 100644 --- a/lib/PDF/Content/Text/Line.rakumod +++ b/lib/PDF/Content/Text/Line.rakumod @@ -7,9 +7,13 @@ unit class PDF::Content::Text::Line; =head2 Methods +=head3 method text + +=para Return the input text for the line. + =head3 method decoded -=para An input list of text atoms +=para Return a list of input text atoms =head3 method encoded @@ -29,7 +33,11 @@ unit class PDF::Content::Text::Line; =head3 method align -=para Alignment offset +=para Alignment offset. + +=head3 method content-width + +=para Return the width of rendered content. use PDF::Content::Ops :OpCode; use Method::Also;