go-cairo

go-cairo

Synopsis

#define             GO_CAIRO_CLAMP                      (x)
#define             GO_CAIRO_CLAMP_SNAP                 (x,even)
void                go_cairo_emit_svg_path              (cairo_t *cr,
                                                         char const *path);
gboolean            go_cairo_surface_is_vector          (cairo_surface_t const *surface);
void                go_cairo_convert_data_to_pixbuf     (unsigned char *dst,
                                                         unsigned char const *src,
                                                         int width,
                                                         int height,
                                                         int rowstride);
void                go_cairo_convert_data_from_pixbuf   (unsigned char *dst,
                                                         unsigned char const *src,
                                                         int width,
                                                         int height,
                                                         int rowstride);

Description

Details

GO_CAIRO_CLAMP()

#define GO_CAIRO_CLAMP(x) CLAMP((x),-15000,15000)

x :

GO_CAIRO_CLAMP_SNAP()

#define GO_CAIRO_CLAMP_SNAP(x,even) GO_CAIRO_CLAMP(even ? floor (x + .5):floor (x) + .5)

x :
even :

go_cairo_emit_svg_path ()

void                go_cairo_emit_svg_path              (cairo_t *cr,
                                                         char const *path);

Emits a path described as a SVG path string (d property of path elements) to a cairo context.

cr : a cairo context
path : a SVG path

go_cairo_surface_is_vector ()

gboolean            go_cairo_surface_is_vector          (cairo_surface_t const *surface);

surface :
Returns :

go_cairo_convert_data_to_pixbuf ()

void                go_cairo_convert_data_to_pixbuf     (unsigned char *dst,
                                                         unsigned char const *src,
                                                         int width,
                                                         int height,
                                                         int rowstride);

Converts the pixel data stored in src in CAIRO_FORMAT_ARGB32 cairo format to GDK_COLORSPACE_RGB pixbuf format and move them to dst. If src == dst, pixel are converted in place.

dst : a pointer to pixel data in pixbuf format
src : a pointer to pixel data in cairo format
width : image width
height : image height
rowstride : data rowstride

go_cairo_convert_data_from_pixbuf ()

void                go_cairo_convert_data_from_pixbuf   (unsigned char *dst,
                                                         unsigned char const *src,
                                                         int width,
                                                         int height,
                                                         int rowstride);

Converts the pixel data stored in src in GDK_COLORSPACE_RGB pixbuf format to CAIRO_FORMAT_ARGB32 cairo format and move them to dst. If src == dst, pixel are converted in place.

dst : a pointer to pixel data in cairo format
src : a pointer to pixel data in pixbuf format
width : image width
height : image height
rowstride : data rowstride