Goo::Canvas::Style(3)

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

πŸ’– Goo::Canvas::Style πŸ’–

okay bestie, so you know how this is from the User Contributed Perl Documentation? yeah. it's that one. it's giving "the perl bindings for GooCanvas finally got a style class" and honestly? we're obsessed πŸŽ€


✨ NAME ✨

Goo::Canvas::Style β€” it's a wrapper for GooCanvasStyle. that's it, that's the whole vibe. a lil perl-y bestie standing in front of the C library like 🫢


🌸 HIERARCHY 🌸

the family tree, and yes it's a short one:

  Glib::Object
  +----Goo::Canvas::Style

so Goo::Canvas::Style is a Glib::Object descendant, periodt. it inherits everything Glib::Object brings to the party, and that's the whole bloodline πŸ’…


πŸ¦‹ METHODS πŸ¦‹

here's the whole roster, no gatekeeping:

✨ style = Goo::Canvas::Style->new

make yourself a brand new style object, fresh out the box. main character energy ✨

style = Goo::Canvas::Style->new

πŸ’– style = $style->copy

copies the style. like a screenshot but for vibes. you get a style back πŸŽ€

style = $style->copy

πŸ’… boolean = $style->set_fill_options ($cr)

sets up the fill options, using the cairo context you hand it. you get back a boolean β€” true or false, no in-between, no "it's complicated".

boolean = $style->set_fill_options ($cr)
  • $cr β€” a cairo_t, i.e. the cairo context. hand it over bestie 🫢

🧚 style = $style->get_parent

returns the parent as a style. your style's style mom, if you will 😭

style = $style->get_parent

🌈 $style->set_parent ($parent)

sets who the parent is. you're assigning a whole parent, that's the power you hold πŸ‘‘

$style->set_parent ($parent)
  • $parent β€” a Goo::Canvas::Style. yes, styles can be parents of styles. it's a whole family dynamic πŸŽ€

⭐ scalar = $style->get_property ($property)

grab a property value. it comes back as a scalar β€” so a string, a number, whatever perl decides it is, and we respect that πŸ’œ

scalar = $style->get_property ($property)
  • $property β€” a string. the name of the property, bestie.

πŸ”₯ $style->set_property ($property, $val)

set a property to a value. you give it a name and a thing, it does the thing ✨

$style->set_property ($property, $val)
  • $property β€” a string. the property's name.
  • $val β€” a scalar. the value you're setting it to.

πŸ“ boolean = $style->set_stroke_options ($cr)

the stroke sibling of set_fill_options β€” sets the stroke options using your cairo context, and gives you back a boolean. so you can ask "did that work" and it'll tell you fr fr πŸ’…

boolean = $style->set_stroke_options ($cr)
  • $cr β€” a cairo_t. the cairo context, again. it's literally always the cairo context.

πŸ‘€ SEE ALSO πŸ‘€

go check out Glib::Object, the parent, the blueprint, the icon it is πŸ’–


Copyright (C) 2025 Gtk2-Perl Team


okay that's the whole page, you ate it up 🌟 this was Goo::Canvas::Style(3) from perl v5.42.0, dated 2025-07-25, and it lives in the User Contributed Perl Documentation section. mwah, go write some canvas code bestie πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from