Goo::Canvas::Text(3)

πŸ“¦
version 0.06 Β· 2 versions
, in fedora 43

πŸ’– Goo::Canvas::Text πŸ’–

okay so bestie, welcome to Goo::Canvas::Text β€” this is the Perl wrapper for GooCanvasText, and honestly? it's giving "put words on a canvas and make them look cute" ✨ this page lives in the User Contributed Perl Documentation section of the manual, section 3 if you're keeping score πŸŽ€


🌸 HIERARCHY 🌸

the family tree, and yes we respect our elders:

Glib::Object
+----Goo::Canvas::ItemSimple
     +----Goo::Canvas::Text

so it's a Glib::Object β†’ Goo::Canvas::ItemSimple β†’ Goo::Canvas::Text situation. generational excellence fr fr πŸ‘‘


πŸ¦‹ INTERFACES πŸ¦‹

  • Goo::Canvas::Item

that's the interface it implements, periodt πŸ’…


✨ METHODS ✨

🌈 item = Goo::Canvas::Text->new ($parent, $string, $x, $y, $width, $anchor, ...)

bestie this is the constructor. here's what you're feeding it:

  • $parent (Goo::Canvas::Item)
  • $string (string)
  • $x (double)
  • $y (double)
  • $width (double)
  • $anchor (Gtk2::AnchorType)
  • ... (list)

the ... is doing a little "and friends" moment, iykyk 🫢


πŸ’œ PROPERTIES πŸ’œ

okay so here's the whole lineup, every single one, no skips:

  • 'alignment' (Pango::Alignment : default "left" : readable / writable) β€” how to align the text πŸ’…
  • 'anchor' (Gtk2::AnchorType : default "north-west" : readable / writable) β€” how to position the text relative to the given x and y coordinates πŸ“
  • 'ellipsize' (Pango::EllipsizeMode : default "none" : readable / writable) β€” the preferred place to ellipsize the string, if the label does not have enough room to display the entire string 😭 (yes, the sad little ... treatment)
  • 'height' (double : default -1 : readable / writable) β€” the height to use to layout the text, or -1 to let the text use as much vertical space as needed πŸ“
  • 'text' (string : default undef : readable / writable) β€” the text to display ✍️
  • 'use-markup' (boolean : default false : readable / writable) β€” whether to parse PangoMarkup in the text, to support different styles 🎨
  • 'width' (double : default -1 : readable / writable) β€” the width to use to layout the text, or -1 to let the text use as much horizontal space as needed πŸ“
  • 'wrap' (Pango::WrapMode : default "word" : readable / writable) β€” the preferred method of wrapping the string if a width has been set πŸŒ€
  • 'x' (double : default 0 : readable / writable) β€” the x coordinate of the text ➑️
  • 'y' (double : default 0 : readable / writable) β€” the y coordinate of the text ⬇️

🧚 ENUMS AND FLAGS 🧚

πŸŽ€ enum Gtk2::AnchorType

  • 'center' / GTK_ANCHOR_CENTER
  • 'north' / GTK_ANCHOR_NORTH
  • 'north-west' / GTK_ANCHOR_NORTH_WEST
  • 'north-east' / GTK_ANCHOR_NORTH_EAST
  • 'south' / GTK_ANCHOR_SOUTH
  • 'south-west' / GTK_ANCHOR_SOUTH_WEST
  • 'south-east' / GTK_ANCHOR_SOUTH_EAST
  • 'west' / GTK_ANCHOR_WEST
  • 'east' / GTK_ANCHOR_EAST
  • 'n' / GTK_ANCHOR_N
  • 'nw' / GTK_ANCHOR_NW
  • 'ne' / GTK_ANCHOR_NE
  • 's' / GTK_ANCHOR_S
  • 'sw' / GTK_ANCHOR_SW
  • 'se' / GTK_ANCHOR_SE
  • 'w' / GTK_ANCHOR_W
  • 'e' / GTK_ANCHOR_E

that's all seventeen of them, both the long-form names and the little abbreviated besties 🫢

🌸 enum Pango::Alignment

  • 'left' / PANGO_ALIGN_LEFT
  • 'center' / PANGO_ALIGN_CENTER
  • 'right' / PANGO_ALIGN_RIGHT

⭐ enum Pango::EllipsizeMode

  • 'none' / PANGO_ELLIPSIZE_NONE
  • 'start' / PANGO_ELLIPSIZE_START
  • 'middle' / PANGO_ELLIPSIZE_MIDDLE
  • 'end' / PANGO_ELLIPSIZE_END

πŸ¦‹ enum Pango::WrapMode

  • 'word' / PANGO_WRAP_WORD
  • 'char' / PANGO_WRAP_CHAR
  • 'word-char' / PANGO_WRAP_WORD_CHAR
  • 'none' / PANGO_WRAP_NONE

πŸ‘€ SEE ALSO πŸ‘€

go read these too, they're the supporting cast:

  • Glib::Object
  • Goo::Canvas::ItemSimple

Copyright (C) 2025 Gtk2-Perl Team


and that's the whole page bestie!! this was generated for perl v5.42.0, dated 2025-07-25, and it's literally the Goo::Canvas::Text(3) manual page β€” slay, go draw some text on a canvas, you absolute icon πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from