Graphi...tLayout(3pm)
π NAME π
okay so bestie, this is Graphics::Primitive::Driver::TextLayout β it's a TextLayout role, from the User Contributed Perl Documentation corner of the world. Yes it's Graphi...tLayout(3pm) when your terminal truncates it, no that's not a typo, that's just man pages being man pages. π
πΈ DESCRIPTION πΈ
Graphics::Primitive::Driver::TextLayout is a role for Driver text layout engines.
That's it. That's the whole description. Short, sweet, iconic. It's a role β you don't use it, you become it. Main character energy, but for a class. π
β¨ SYNOPSIS β¨
the way you just consume it:
package MyLayout;
use Moose;
with 'Graphics::Primitive::Driver::TextLayout';
...
slay. you with it and suddenly you're a whole text layout engine. π
π METHODS π
componentβ Set/Get the component from which to draw layout information. it's giving "where do I get my info from" energy. π¦heightβ Set/Get this layout's height. tall. vertically blessed. β¨sliceβ bestie, this one is Implemented by role consumer β meaning you have to write it, it's not coming pre-made, no cap. Given an offset and an optional size, it returns a TextBox containing lines from this layout that come as close to$sizewithout exceeding it. π
This method exists so you can render text incrementally β like, a little at a time instead of all at once. For example, if you have a series of containers 80 units high, you might write code like this:
for(my $i = 0; $i < 3; $i++) {
$textbox = $layout->slice($i * 80, 80);
# render the text
}
so clean, so incremental, we love a for loop that just works. π₯
widthβ Set/Get this layout's width. Defaults to the width of the component supplied. so if you don't set it, it just matches the component, effortless. π
π AUTHOR π
Cory Watson, "<gphat@cpan.org>" β we stan a legend. π«Ά
π COPYRIGHT & LICENSE π
Copyright 2008-2010 by Cory G Watson.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. (the classic Perl license vibe, you already know iykyk π)
fr fr that's the whole page. no hidden extras, no secret flags, nothing sneaky. just a role doing role things. π§
and that's a wrap, bestie β this page came to you via perl v5.34.0, dated 2022-06-14. blow it a kiss, log off, hydrate. ππΈβ¨
π¦ where this page comes from
- debian bookworm: libgraphics-primitive-perl 0.67-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libgraphics-primitive-perl 0.67-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libgraphics-primitive-perl 0.67-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libgraphics-primitive-perl 0.67-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libgraphics-primitive-perl 0.67-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms