Package: gdk

GBoxed gdk:rgba

Declaration

(glib:define-gboxed-cstruct rgba "GdkRGBA"
  (:export t
   :type-initializer "gdk_rgba_get_type")
  (red :float :initform 0.0)
  (green :float :initform 0.0)
  (blue :float :initform 0.0)
  (alpha :float :initform 0.0))  

Values

red
The intensity of the red channel from 0.0 to 1.0 inclusive.
green
The intensity of the green channel from 0.0 to 1.0 inclusive.
blue
The intensity of the blue channel from 0.0 to 1.0 inclusive.
alpha
The opacity of the color from 0.0 for completely translucent to 1.0 for opaque.

Details

The gdk:rgba structure is used to represent a (possibly translucent) color, in a way that is compatible with Cairo's notion of color. All values are in the range from 0.0 to 1.0 inclusive. So the color
(gdk:rgba-new :red 0.0 :green 0.0 :blue 0.0 :alpha 0.0)  
represents transparent black and
(gdk:rgba-new :red 1.0 :green 1.0 :blue 1.0 :alpha 1.0)  
is opaque white. Other values will be clamped to this range when drawing.
 

Returned by

Slot Access Functions

2025-1-11