Goo::Ca...ageModel(3)

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

✨ NAME ✨

Goo::Canvas::ImageModel β€” bestie, it's literally just a wrapper for GooCanvasImageModel πŸ–ΌοΈπŸ’–

Like, that's the whole gig. She's a glow-up layer sitting on top of the C thing so your Perl code doesn't have to touch anything scary. Obsessed, honestly.


πŸ¦‹ HIERARCHY πŸ¦‹

okay so here's the family tree, and yes she comes from a long line of icons πŸ‘‘

Glib::Object
+----Goo::Canvas::ItemModelSimple
     +----Goo::Canvas::ImageModel

Read it top to bottom like a group chat scrollback: Glib::Object is the great-grandma, Goo::Canvas::ItemModelSimple is the mom, and Goo::Canvas::ImageModel is the main character at the bottom. πŸ’…


🌸 INTERFACES 🌸

She also shows up to the party wearing:

  • Goo::Canvas::ItemModel

That's it, that's the list, and she ate. πŸŽ€


✨ METHODS ✨

🌈 itemmodel = Goo::Canvas::ImageModel->new ($parent, $pixbuf, $x, $y, ...)

This is the constructor, the birth of a legend, the moment she enters the room 🫢 Here's what you gotta hand her:

  • $parent β€” a Goo::Canvas::ItemModel. Your new image needs a parent, she's not moving out on her own.
  • $pixbuf β€” type is (unknown), bestie, the docs are being mysterious about it, we just report what we know πŸ™ˆ
  • $x β€” a double. The x situation.
  • $y β€” a double. The y situation.
  • ... β€” a list. Yes, literally, extra stuff goes here. The dots said so. ⭐

πŸ’– PROPERTIES πŸ’–

Every one of these is readable / writable unless noted, and every one is a lil vibe check you can do whenever:

  • alpha (double : default 1 : readable / writable) β€” the opacity of the image. 0.0 is fully transparent (ghost mode πŸ‘») and 1.0 is opaque (fully here, fully booked πŸ’…).
  • height (double : default 0 : readable / writable) β€” the height of the image. That's it, that's the whole thing.
  • pattern (Goo::Cairo::Pattern : default undef : readable / writable) β€” the cairo pattern to paint. Fancy brush energy. 🎨
  • pixbuf (Gtk2::Gdk::Pixbuf : default undef : writable) β€” the GdkPixbuf to display. Heads up: this one is writable only, no reading back, so don't go peeking. πŸ™ˆ
  • scale-to-fit (boolean : default false : readable / writable) β€” if the image is scaled to fit the width and height settings. Default is false, so she stays her natural size until you say otherwise.
  • width (double : default 0 : readable / writable) β€” the width of the image. Periodt.
  • x (double : default 0 : readable / writable) β€” the x coordinate of the image.
  • y (double : default 0 : readable / writable) β€” the y coordinate of the image.
ngl, x and y both default to 0, so she starts out in the corner like she's waiting for you to give her directions 🧚

🌟 SEE ALSO 🌟

Go bother these queens when you need more:

  • Glib::Object
  • Goo::Canvas::ItemModelSimple

iykyk πŸ’œ


Copyright (C) 2025 Gtk2-Perl Team


and that's the whole page bestie, we're done here πŸŽ€βœ¨

perl v5.42.0 Β· 2025-07-25 Β· mwah, go write something cute πŸ’–πŸ¦‹

πŸ“¦ where this page comes from