Gnome2:...:PathDef(3)
π NAME π
Gnome2::Canvas::PathDef β bestie, it's a wrapper for GnomeCanvasPathDef. That's the whole vibe. She's a little boxed object who holds a whole path (like, lines and curves and shapes, the works) so your canvas can draw it. β¨
π¦ HIERARCHY π¦
Glib::Boxed
+----Gnome2::Canvas::PathDef
So she's a Glib::Boxed girly, which means she gets all the boxed-type energy from Glib, and then adds her own path stuff on top. Main character lineage fr. π
β¨ METHODS β¨
pathdef = Gnome2::Canvas::PathDef->new
Makes you a brand-new, empty path. Blank slate, no thoughts, just vibes. π
pathdef = Gnome2::Canvas::PathDef->new_sized ($length)
Same thing but you tell her how big she's gonna get up front.
$lengthβ an integer. That's your size hint, bestie. π
boolean = $path->all_closed
Returns true if literally every part of the path is closed. All of them. No stragglers. π«Ά
boolean = $path->all_open
Returns true if every single part is open. Not one of them is closed. Iconic behaviour. πΈ
boolean = $path->any_closed
True if at least one part is closed. Low bar but she clears it. π
boolean = $path->any_open
True if at least one part is open. Same energy, opposite check. π
pathdef = $path->close_all
Closes every part of the path. Returns a pathdef. π
pathdef = $path->closed_parts
Gives you back just the closed parts, as a pathdef. Only the closed girlies make the cut. π
$path->closepath
Closes the current path. That's it, that's the method. β¨
$path->closepath_current
Closes the current subpath. Different thing, very important distinction, no notes. π
pathdef = Gnome2::Canvas::PathDef->concat (...)
Glues a bunch of pathdefs together into one big pathdef. Friendship bracelet energy. π«Ά
...β a list ofGnome2::Canvas::PathDefobjects to concatenate.
$dst->copy ($src)
$srcβ aGnome2::Canvas::PathDef.
Copies the path from $src into $dst. π«
Heads up bestie, this is NOT the same as the copy thatGlib::Boxedgives you. The semantics are very different. If you want the Glib::Boxed-flavoured behaviour,duplicateis the one you actually want. Do not mix these up, I am begging. π
$path->curveto ($x0, $y0, $x1, $y1, $x2, $y2)
Draws a cubic curve. Six numbers, three points, one slay. π
$x0β a double.$y0β a double.$x1β a double.$y1β a double.$x2β a double.$y2β a double.
pathdef = $path->duplicate
Hands you a copy of the path. This is the analog to Glib::Boxed's copy, remember that. π§
$path->ensure_space ($space)
Makes sure there's room for more.
$spaceβ an integer. Your space budget, bestie. π
$path->finish
Finishes the path off. Wrap it up, we're done here. β
boolean = $path->has_currentpoint
True if there's a current point hanging out. Sometimes there isn't. She's mysterious like that. π
boolean = $path->is_empty
True if the path is empty. Empty path = no thoughts, head empty. π
integer = $path->length
Tells you how long the path is, as an integer. π’
$path->lineto ($x, $y)
Draws a straight line to a point. Simple, clean, effective. π
$xβ a double.$yβ a double.
$path->lineto_moving ($x, $y)
A line to a point, but moving. Yes that's vague, no I will not elaborate, the docs didn't either. π
$xβ a double.$yβ a double.
$path->moveto ($x, $y)
Moves the current point without drawing anything. Just repositioning, no ink spilled. β¨
$xβ a double.$yβ a double.
pathdef = $path->open_parts
Gives you back only the open parts, as a pathdef. The opposite of closed_parts, they're sisters. π¦
$path->reset
Wipes the path back to nothing. Clean slate, fresh start, new semester energy. π
@pathdefs = $path->split
Splits the path into a list of pathdefs. One becomes many. She contains multitudes. πΈ
π SEE ALSO π
Gnome2::CanvasGlib::Boxed
π COPYRIGHT π
Copyright (C) 2003-2004 by the Gtk2-Perl Team.
This software is licensed under the LGPL; see Gnome2::Canvas for a full notice.
okay that's the whole page bestie, you ate that π«Ά this was pulled straight from the user contributed perl documentation for Gnome2:...:PathDef, perl v5.42.0, dated 2025-07-25 β mwah, periodt π
β¨
π¦ where this page comes from
- fedora 43: perl-Gnome2-Canvas 1.006-18.fc43 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms