Colors

Colors

Synopsis


#include <ccc.h>


                    CcColor;
typedef             CcColorRgb;
typedef             CcColorHsv;
                    CcColorClass;
CcColor*            cc_color_new_hsv                    (gdouble hue,
                                                         gdouble saturation,
                                                         gdouble value);
CcColor*            cc_color_new_hsva                   (gdouble hue,
                                                         gdouble saturation,
                                                         gdouble value,
                                                         gdouble alpha);
CcColor*            cc_color_new_rgb                    (gdouble red,
                                                         gdouble green,
                                                         gdouble blue);
CcColor*            cc_color_new_rgba                   (gdouble red,
                                                         gdouble green,
                                                         gdouble blue,
                                                         gdouble alpha);
void                cc_color_apply                      (CcColor const *self,
                                                         gdouble *red,
                                                         gdouble *green,
                                                         gdouble *blue,
                                                         gdouble *alpha);
void                cc_color_stop                       (CcColor const *self,
                                                         cairo_pattern_t *pattern,
                                                         gdouble offset);

Object Hierarchy


  GObject
   +----GInitiallyUnowned
         +----CcColor
               +----CcColorHsv
               +----CcColorRgb

  GObject
   +----GInitiallyUnowned
         +----CcColor
               +----CcColorRgb

  GObject
   +----GInitiallyUnowned
         +----CcColor
               +----CcColorHsv

Properties


  "alpha"                    gdouble               : Read / Write / Construct
  "blue"                     gdouble               : Read / Write / Construct
  "green"                    gdouble               : Read / Write / Construct
  "red"                      gdouble               : Read / Write / Construct
  "hue"                      gdouble               : Read / Write / Construct
  "saturation"               gdouble               : Read / Write / Construct
  "value"                    gdouble               : Read / Write / Construct

Description

Details

CcColor

typedef struct _CcColor CcColor;


CcColorRgb

typedef CcColor CcColorRgb;


CcColorHsv

typedef CcColor CcColorHsv;


CcColorClass

typedef struct {
	GInitiallyUnownedClass base_class;

	/* vtable */
	void (*apply) (CcColor const* self,
		       gdouble      * red,
		       gdouble      * green,
		       gdouble      * blue,
		       gdouble      * alpha);
} CcColorClass;


cc_color_new_hsv ()

CcColor*            cc_color_new_hsv                    (gdouble hue,
                                                         gdouble saturation,
                                                         gdouble value);

hue :
saturation :
value :
Returns :

cc_color_new_hsva ()

CcColor*            cc_color_new_hsva                   (gdouble hue,
                                                         gdouble saturation,
                                                         gdouble value,
                                                         gdouble alpha);

hue :
saturation :
value :
alpha :
Returns :

cc_color_new_rgb ()

CcColor*            cc_color_new_rgb                    (gdouble red,
                                                         gdouble green,
                                                         gdouble blue);

red :
green :
blue :
Returns :

cc_color_new_rgba ()

CcColor*            cc_color_new_rgba                   (gdouble red,
                                                         gdouble green,
                                                         gdouble blue,
                                                         gdouble alpha);

red :
green :
blue :
alpha :
Returns :

cc_color_apply ()

void                cc_color_apply                      (CcColor const *self,
                                                         gdouble *red,
                                                         gdouble *green,
                                                         gdouble *blue,
                                                         gdouble *alpha);

Initializes red, green, blue and alpha to represent the color specified by self:

self : a CcColor
red : target for red component
green : target for green component
blue : target for blue component
alpha : target for alpha value

cc_color_stop ()

void                cc_color_stop                       (CcColor const *self,
                                                         cairo_pattern_t *pattern,
                                                         gdouble offset);

Specify a color stop in pattern at offset with the color of self.

self : a CcColor
pattern : a cairo_pattern_t
offset : [0.0..1.0]

Property Details

The "alpha" property

  "alpha"                    gdouble               : Read / Write / Construct

Alpha.

Allowed values: [0,1]

Default value: 1


The "blue" property

  "blue"                     gdouble               : Read / Write / Construct

Blue.

Allowed values: [0,1]

Default value: 1


The "green" property

  "green"                    gdouble               : Read / Write / Construct

Green.

Allowed values: [0,1]

Default value: 1


The "red" property

  "red"                      gdouble               : Read / Write / Construct

Red.

Allowed values: [0,1]

Default value: 1


The "hue" property

  "hue"                      gdouble               : Read / Write / Construct

Hue.

Allowed values: [0,1]

Default value: 0


The "saturation" property

  "saturation"               gdouble               : Read / Write / Construct

Saturation.

Allowed values: [0,1]

Default value: 0


The "value" property

  "value"                    gdouble               : Read / Write / Construct

Value.

Allowed values: [0,1]

Default value: 1