Deprecated 3.8Since 3.0add_Adds a stop color to gradient.
Deprecatedoffset: number
offset for the color stop
Deprecatedcolor: Gtk.SymbolicColor
color to use
since 3.8: Gtk.Gradient is deprecated.
Deprecated 3.8Since 3.0refIncreases the reference count of gradient.
The same gradient
since 3.8: Gtk.Gradient is deprecated.
Deprecated 3.8Since 3.0resolveIf gradient is resolvable, resolved_gradient will be filled in
with the resolved gradient as a cairo_pattern_t, and true will
be returned. Generally, if gradient can’t be resolved, it is
due to it being defined on top of a named color that doesn't
exist in props.
Deprecatedprops: Gtk.StyleProperties
Gtk.StyleProperties to use when resolving named colors
true if the gradient has been resolved
since 3.8: Gtk.Gradient is deprecated.
Deprecated 3.8to_Creates a string representation for gradient that is suitable
for using in GTK CSS files.
A string representation for gradient
since 3.8: Gtk.Gradient is deprecated.
Deprecated 3.8Since 3.0unrefDecreases the reference count of gradient, freeing its memory
if the reference count reaches 0.
since 3.8: Gtk.Gradient is deprecated.
Staticnew_Staticnew_
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.