PDF::F...::Line(3pm)

πŸ“¦
version 0.34 Β· 2 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

πŸ’– 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 X1 nor X2 is set, then X1 gets set to the lefthand margin, and X2 gets set to X1 + 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 Y values isn't set, it gets set to the current Y value. easy.
  • W β€” this is the width of the line to be drawn. heads up: it's only used when calculating X1/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. PAGEDEF for more info on those parameters β€” it's got the lore ✨)
  • WIDTH β€” this is the thickness of the line to be drawn. yes W and WIDTH are different things, don't @ me, defaults to 1 pixel. 😭
  • COLOR β€” the color to draw the line in. defaults to black. 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