CcGradient

CcGradient

Synopsis


#include <ccc.h>


typedef             CcGradient;
                    CcGradientClass;
void                cc_gradient_add_stop                (CcGradient *self,
                                                         gdouble offset,
                                                         CcColor *color);
cairo_pattern_t*    cc_gradient_create_pattern          (CcGradient const*self,
                                                         CcView const *view,
                                                         CcItem const *item);
GType               cc_gradient_get_type                (void);

Object Hierarchy


  GObject
   +----GInitiallyUnowned
         +----CcBrush
               +----CcGradient
                     +----CcLinearGradient
                     +----CcRadialGradient

Description

Details

CcGradient

typedef CcBrush                 CcGradient;


CcGradientClass

typedef struct {
	CcBrushClass base_class;

	/* vtable */
	cairo_pattern_t* (*create_pattern)(CcGradient const* self,
					   CcView const    * view,
					   CcItem const    * item);
} CcGradientClass;


cc_gradient_add_stop ()

void                cc_gradient_add_stop                (CcGradient *self,
                                                         gdouble offset,
                                                         CcColor *color);

Adds a color stop to a gradient. Color stops don't need to be inserted in order sorting happens automatically.

self : a CcGradient
offset : the offset of the color stop (in [0.0;1.0])
color : the CcColor for this stop

cc_gradient_create_pattern ()

cairo_pattern_t*    cc_gradient_create_pattern          (CcGradient const*self,
                                                         CcView const *view,
                                                         CcItem const *item);

Creates a cairo_pattern_t for rendering a gradient on item in view.

self : a CcGradient
view : a CcView
item : a CcItem
Returns : a cairo_pattern_t.

cc_gradient_get_type ()

GType               cc_gradient_get_type                (void);

Returns :