include/mb_paint.h File Reference

#include <cairo.h>
#include "mb_types.h"
#include "mb_redraw_man.h"
#include "mb_tools.h"

Go to the source code of this file.

Classes

struct  _grad_stop

Defines

#define paint_init(_paint, _prepare, _free)
#define grad_stop_init(stop, _offset, _r, _g, _b, _a)

Typedefs

typedef float co_comp_t
typedef struct _grad_stop grad_stop_t

Functions

paint_trdman_paint_color_new (redraw_man_t *rdman, co_comp_t r, co_comp_t g, co_comp_t b, co_comp_t a)
void paint_color_set (paint_t *paint, co_comp_t r, co_comp_t g, co_comp_t b, co_comp_t a)
void paint_color_get (paint_t *paint, co_comp_t *r, co_comp_t *g, co_comp_t *b, co_comp_t *a)
paint_trdman_paint_linear_new (redraw_man_t *rdman, co_aix x1, co_aix y1, co_aix x2, co_aix y2)
grad_stop_tpaint_linear_stops (paint_t *paint, int n_stops, grad_stop_t *stops)
 Setup color stop for a linear radient paint.
paint_trdman_paint_radial_new (redraw_man_t *rdman, co_aix cx, co_aix cy, co_aix r)
grad_stop_tpaint_radial_stops (paint_t *paint, int n_stops, grad_stop_t *stops)
 Setup color stop for a radial radient paint.


Define Documentation

#define grad_stop_init ( stop,
_offset,
_r,
_g,
_b,
_a   ) 

Value:

do {                                            \
        (stop)->offset = _offset;                       \
        (stop)->r = _r;                                 \
        (stop)->g = _g;                                 \
        (stop)->b = _b;                                 \
        (stop)->a = _a;                                 \
    } while(0)

Definition at line 47 of file mb_paint.h.

#define paint_init ( _paint,
_prepare,
_free   ) 

Value:

do {                                    \
         (_paint)->flags = 0;                   \
         (_paint)->prepare = _prepare;          \
         (_paint)->free = _free;                \
         STAILQ_INIT((_paint)->members);        \
         (_paint)->pnt_next = NULL;             \
     } while(0)                                 \

Definition at line 20 of file mb_paint.h.


Typedef Documentation

typedef float co_comp_t

Definition at line 9 of file mb_paint.h.

typedef struct _grad_stop grad_stop_t


Function Documentation

void paint_color_get ( paint_t paint,
co_comp_t r,
co_comp_t g,
co_comp_t b,
co_comp_t a 
)

Definition at line 56 of file paint.c.

void paint_color_set ( paint_t paint,
co_comp_t  r,
co_comp_t  g,
co_comp_t  b,
co_comp_t  a 
)

Definition at line 45 of file paint.c.

grad_stop_t* paint_linear_stops ( paint_t paint,
int  n_stops,
grad_stop_t stops 
)

Setup color stop for a linear radient paint.

stops should be managed by users of the function. It should be available before the paint being freed or changed to another array of stops.

Definition at line 143 of file paint.c.

grad_stop_t* paint_radial_stops ( paint_t paint,
int  n_stops,
grad_stop_t stops 
)

Setup color stop for a radial radient paint.

stops should be managed by users of the function. It should be available before the paint being freed or changed to another array of stops.

Definition at line 230 of file paint.c.

paint_t* rdman_paint_color_new ( redraw_man_t rdman,
co_comp_t  r,
co_comp_t  g,
co_comp_t  b,
co_comp_t  a 
)

Definition at line 29 of file paint.c.

paint_t* rdman_paint_linear_new ( redraw_man_t rdman,
co_aix  x1,
co_aix  y1,
co_aix  x2,
co_aix  y2 
)

Definition at line 114 of file paint.c.

paint_t* rdman_paint_radial_new ( redraw_man_t rdman,
co_aix  cx,
co_aix  cy,
co_aix  r 
)

Definition at line 204 of file paint.c.

SourceForge.net Logo