src/paint.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <cairo.h>
#include "mb_paint.h"
Go to the source code of this file.
|
Classes |
struct | _paint_color |
| Solid color paint. More...
|
struct | _paint_linear |
| Linear gradient. More...
|
struct | _paint_radial |
| Radial gradient. More...
|
Defines |
#define | ASSERT(x) |
#define | LIF_DIRTY 0x1 |
#define | RDF_DIRTY 0x1 |
Typedefs |
typedef struct _paint_color | paint_color_t |
| Solid color paint.
|
typedef struct _paint_linear | paint_linear_t |
| Linear gradient.
|
typedef struct _paint_radial | paint_radial_t |
| Radial gradient.
|
Functions |
static void | paint_color_prepare (paint_t *paint, cairo_t *cr) |
static void | paint_color_free (redraw_man_t *rdman, paint_t *paint) |
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) |
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) |
static void | paint_linear_prepare (paint_t *paint, cairo_t *cr) |
static void | paint_linear_free (redraw_man_t *rdman, paint_t *paint) |
paint_t * | rdman_paint_linear_new (redraw_man_t *rdman, co_aix x1, co_aix y1, co_aix x2, co_aix y2) |
grad_stop_t * | paint_linear_stops (paint_t *paint, int n_stops, grad_stop_t *stops) |
| Setup color stop for a linear radient paint.
|
static void | paint_radial_prepare (paint_t *paint, cairo_t *cr) |
static void | paint_radial_free (redraw_man_t *rdman, paint_t *paint) |
paint_t * | rdman_paint_radial_new (redraw_man_t *rdman, co_aix cx, co_aix cy, co_aix r) |
grad_stop_t * | paint_radial_stops (paint_t *paint, int n_stops, grad_stop_t *stops) |
| Setup color stop for a radial radient paint.
|
Variables |
int | _paint_color_size = sizeof(paint_color_t) |
Define Documentation
Typedef Documentation
Radial gradient.
NOTE: The only supported gradient unit is userSpaceOnUse.
Function Documentation
static void paint_color_prepare |
( |
paint_t * |
paint, |
|
|
cairo_t * |
cr | |
|
) |
| | [static] |
static void paint_linear_prepare |
( |
paint_t * |
paint, |
|
|
cairo_t * |
cr | |
|
) |
| | [static] |
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.
static void paint_radial_prepare |
( |
paint_t * |
paint, |
|
|
cairo_t * |
cr | |
|
) |
| | [static] |
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.
Variable Documentation