![]() |
![]() |
![]() |
libccc Reference Manual | ![]() |
---|---|---|---|---|
#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);
GObject +----GInitiallyUnowned +----CcBrush +----CcGradient +----CcLinearGradient +----CcRadialGradient
typedef struct { CcBrushClass base_class; /* vtable */ cairo_pattern_t* (*create_pattern)(CcGradient const* self, CcView const * view, CcItem const * item); } CcGradientClass;
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 |
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. |