type Gtk_Gradient is new Glib.C_Boxed with null record;
Null_Gtk_Gradient : constant Gtk_Gradient;
function From_Object
( | Object | : System.Address) return Gtk_Gradient; |
function From_Object_Free
( | B | : access Gtk_Gradient'Class) return Gtk_Gradient; |
procedure Gtk_New_Linear
( | Self | : out Gtk_Gradient; |
X0 | : Gdouble; | |
Y0 | : Gdouble; | |
X1 | : Gdouble; | |
Y1 | : Gdouble); |
function Gtk_Gradient_New_Linear
( | X0 | : Gdouble; |
Y0 | : Gdouble; | |
X1 | : Gdouble; | |
Y1 | : Gdouble) return Gtk_Gradient; |
procedure Gtk_New_Radial
( | Self | : out Gtk_Gradient; |
X0 | : Gdouble; | |
Y0 | : Gdouble; | |
Radius0 | : Gdouble; | |
X1 | : Gdouble; | |
Y1 | : Gdouble; | |
Radius1 | : Gdouble); |
function Gtk_Gradient_New_Radial
( | X0 | : Gdouble; |
Y0 | : Gdouble; | |
Radius0 | : Gdouble; | |
X1 | : Gdouble; | |
Y1 | : Gdouble; | |
Radius1 | : Gdouble) return Gtk_Gradient; |
function Get_Type return Glib.GType;
procedure Add_Color_Stop
( | Self | : Gtk_Gradient; |
Offset | : Gdouble; | |
Color | : Gtk.Symbolic_Color.Gtk_Symbolic_Color); |
function Ref
( | Self | : Gtk_Gradient) return Gtk_Gradient; |
function Resolve
( | Self | : Gtk_Gradient; |
Props | : not null access Gtk.Style_Properties.Gtk_Style_Properties_Record'Class; | |
Resolved_Gradient | : access Cairo.Cairo_Pattern) return Boolean; |
function Resolve_For_Context
( | Self | : Gtk_Gradient; |
Context | : not null access Gtk.Style_Context.Gtk_Style_Context_Record'Class) return Cairo.Cairo_Pattern; |
function To_String
( | Self | : Gtk_Gradient) return UTF8_String; |
procedure Unref
( | Self | : Gtk_Gradient); |
GtkGradient is a boxed type that represents a gradient. It is the result of parsing a <link linkend="gtkcssprovider-gradients">gradient expression</link>. 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_t value.
It is not normally necessary to deal directly with Gtk_Gradients, since they are mostly used behind the scenes by Gtk.Style_Context.Gtk_Style_Context and Gtk.Css_Provider.Gtk_Css_Provider.
Gtk.Gradient.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.