Brushes

Brushes

Synopsis


#include <ccc.h>


                    CcBrush;
                    CcBrushClass;
void                cc_brush_apply                      (CcBrush *self,
                                                         CcView *view,
                                                         CcItem *item,
                                                         cairo_t *cr);

Object Hierarchy


  GObject
   +----GInitiallyUnowned
         +----CcBrush
               +----CcBrushColor
               +----CcGradient

Description

Details

CcBrush

typedef struct _CcBrush CcBrush;


CcBrushClass

typedef struct {
	GInitiallyUnownedClass base_class;

	/* vtable */
	void (*apply) (CcBrush* brush,
		       CcView * view,
		       CcItem * item,
		       cairo_t* cr);
} CcBrushClass;

A brush class.

GInitiallyUnownedClass base_class; the parent class for GType
apply () the virtual function that's called from cc_brush_apply()

cc_brush_apply ()

void                cc_brush_apply                      (CcBrush *self,
                                                         CcView *view,
                                                         CcItem *item,
                                                         cairo_t *cr);

Apply a brush to a cairo context. The brush will be used to display item in view.

This is usually used from item implementations while rendering to a context.

self : a CcBrush
view : a CcView
item : a CcItem
cr : a cairo context