Class (GI Struct)

Gtk-3.0GtkGradient

GtkGradient is a boxed type that represents a gradient. It is the result of parsing a [gradient expression][gtkcssprovider-gradients]. To obtain the gradient represented by a GtkGradient, it has to be resolved with gtk_gradient_resolve(), which replaces all symbolic color references by the colors they refer to (in a given context) and constructs a cairo.Pattern value.

It is not normally necessary to deal directly with GtkGradients, since they are mostly used behind the scenes by Gtk.StyleContext and Gtk.CssProvider.

Gtk.Gradient is deprecated. It was used internally by GTK’s CSS engine to represent gradients. As its handling is not conforming to modern web standards, it is not used anymore. If you want to use gradients in your own code, please use Cairo directly.

Index

Constructors

Properties

$gtype: GType<Gtk.Gradient>

Methods

  • Creates a string representation for gradient that is suitable for using in GTK CSS files.

    Returns string

    A string representation for gradient

  • Decreases the reference count of gradient, freeing its memory if the reference count reaches 0.

    Returns void

  • Parameters

    • x0: number
    • y0: number
    • radius0: number
    • x1: number
    • y1: number
    • radius1: number

    Returns Gtk.Gradient