Gtk2::Curve(3)

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

πŸ’– Gtk2::Curve β€” bestie, it's a curve widget

okay so this is Gtk2::Curve, and it's literally just the Perl wrapper for GtkCurve. that's it, that's the whole name section, we move. ✨

(also hi, this page lives in the User Contributed Perl Documentation section of the manual, section 3, and yes it's the Gtk2::Curve(3) page you were looking for 🫢)


🌸 HIERARCHY 🌸

this is the family tree, the ancestry, the lineage, and you gotta respect it:

Glib::Object
+----Glib::InitiallyUnowned
     +----Gtk2::Object
          +----Gtk2::Widget
               +----Gtk2::DrawingArea
                    +----Gtk2::Curve

so Gtk2::Curve is a Gtk2::DrawingArea is a Gtk2::Widget is a Gtk2::Object is a Glib::InitiallyUnowned is a Glib::Object. generational wealth fr fr. πŸ‘‘


πŸ¦‹ INTERFACES πŸ¦‹

it also rocks these interfaces, like accessories but for objects:

  • Glib::Object::_Unregistered::AtkImplementorIface
  • Gtk2::Buildable

✨ METHODS ✨

πŸŽ€ widget = Gtk2::Curve->new

make a brand new curve. that's the whole vibe. slay.

πŸ’… $curve->set_curve_type ($type)

sets what kind of curve this is.

  • $type (a Gtk2::CurveType)

🌈 $curve->set_gamma ($gamma)

sets the gamma, bestie.

  • $gamma (double)

πŸ“ $curve->set_range ($min_x, $max_x, $min_y, $max_y)

the range. the whole range. all four of them.

  • $min_x (double)
  • $max_x (double)
  • $min_y (double)
  • $max_y (double)

🧚 $curve->reset

boom. reset. back to square one, no questions asked.

⭐ list = $curve->get_vector ($veclen=32)

returns a list of real numbers β€” that's the curve's vector, the actual data of the whole thing.

  • $veclen (integer) β€” and heads up, it defaults to 32

πŸ’œ $curve->set_vector (...)

sets the vector. so like, the points of the curve.

  • ... (list) of float's, the points of the curve

πŸ‘‘ PROPERTIES πŸ‘‘

'curve-type' (Gtk2::CurveType : default "spline" : readable / writable / private / static-nick / static-blurb)

Is this curve linear, spline interpolated, or free-form

'max-x' (float : default 1 : readable / writable / private / static-nick / static-blurb)

Maximum possible X value

'max-y' (float : default 1 : readable / writable / private / static-nick / static-blurb)

Maximum possible value for Y

'min-x' (float : default 0 : readable / writable / private / static-nick / static-blurb)

Minimum possible value for X

'min-y' (float : default 0 : readable / writable / private / static-nick / static-blurb)

Minimum possible value for Y


πŸ”₯ SIGNALS πŸ”₯

  • curve-type-changed (Gtk2::Curve)

that's the one. it fires, you handle it, iconic behavior.


πŸ’€ ENUMS AND FLAGS πŸ’€

enum Gtk2::CurveType

the three moods a curve can be in:

  • 'linear' / GTK_CURVE_TYPE_LINEAR
  • 'spline' / GTK_CURVE_TYPE_SPLINE
  • 'free' / GTK_CURVE_TYPE_FREE

🫢 SEE ALSO 🫢

go read these next, iykyk:

Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget, Gtk2::DrawingArea


Copyright (C) 2003-2011 by the gtk2-perl team.

This software is licensed under the LGPL. See Gtk2 for a full notice.

bestie real talk: that's a real license, respect it, read Gtk2 for the full notice πŸ’–

and that's the whole page, no cap. this was Gtk2::Curve(3) from perl v5.42.0, dated 2025-07-25. mwah, go make something pretty πŸŒΈπŸ’…βœ¨

πŸ“¦ where this page comes from