PDF::F...::Line(3pm)
π PDF::F...::Line β bestie edition π
okay so this is PDF::FromHTML::Template::Element::Line, a Perl module, and its whole personality is drawing lines. that's it. that's the job. and honestly? iconic. π
(also the manual name is PDF::F...::Line(3pm) if you were wondering β yes the ellipsis is load-bearing, no I will not explain, iykyk β¨)
β¨ NAME β¨
PDF::FromHTML::Template::Element::Line β to draw lines. literally just lines. slay. π¦
πΈ NODE NAME πΈ
LINE
that's the node name. that's what you call it. periodt. π
𧬠INHERITANCE π§¬
PDF::FromHTML::Template::Element
so this one's a child of that one, it inherits the family vibes. π
π ATTRIBUTES π
X1/X2/Y1/Y2β the line goes from (X1,Y1) to (X2,Y2). that's the whole journey fr fr.- if neither
X1norX2is set, thenX1gets set to the lefthand margin, andX2gets set toX1 + W. so it just vibes across the page on its own π«Ά - if only one of them is set, the other one gets set to the first one +/-
W. math is happening, we love to see it. - if either of the
Yvalues isn't set, it gets set to the currentYvalue. easy.
- if neither
Wβ this is the width of the line to be drawn. heads up: it's only used when calculatingX1/X2/Y1/Y2, and only if it's actually needed (see above, q.v.). defaults to the distance between the left and right margins. (q.v.PAGEDEFfor more info on those parameters β it's got the lore β¨)WIDTHβ this is the thickness of the line to be drawn. yesWandWIDTHare different things, don't @ me, defaults to1pixel. πCOLORβ the color to draw the line in. defaults toblack. classic. π€
πΆ CHILDREN πΆ
PDF::FromHTML::Template::Element::HorizontalRule
it can have this one as a child. cute family dynamic honestly. π
π AFFECTS π
Nothing
it affects nothing. zero impact. it's just out here drawing lines and minding its business. π
π§ DEPENDENCIES π§
None
no dependencies, fully independent queen. no cap. π
β USAGE β
<line X1="1i" Y1="1i" X2="3i" Y2="2i" WIDTH="3" COLOR="0,0,255"/>
so what does this actually do?? it draws a blue line, 3 pixels thick, starting from the spot 1" in from the left and 1" from the top, and ending at the spot 3" from the left and 2" from the top. diagonal moment. ate. π₯
π AUTHOR π
Rob Kinyon (rkinyon@columbus.rr.com)
thank you Rob, the line-drawing legend himself. π«‘
π SEE ALSO π
PAGEDEF, HR
go read those too bestie, they're in the group chat. π¬
okay that's the whole page!! no notes, no skipped details, every flag and default accounted for. π
and for the record: this was perl v5.38.2, dated 2024-07-28 β so if you're reading this, hi from the archive, hope your lines are straight and your margins are clean πβ¨
mwah, bye bestie π π
π¦ where this page comes from
- debian trixie: libpdf-fromhtml-perl 0.34-1 Β· CC0-1.0
- ubuntu resolute: libpdf-fromhtml-perl 0.34-1 Β· CC0-1.0
- ubuntu stonking: libpdf-fromhtml-perl 0.34-1 Β· CC0-1.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms