Defines | Functions

go-cairo.h File Reference

#include <cairo.h>
#include <glib.h>
#include <math.h>

Go to the source code of this file.

Defines

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

Functions

void go_cairo_emit_svg_path (cairo_t *cr, char const *path)
 go_cairo_emit_svg_path: : a cairo context : a SVG 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)
 go_cairo_convert_data_to_pixbuf: : a pointer to pixel data in cairo format : a pointer to pixel data in pixbuf format : image width : image height : data rowstride
void go_cairo_convert_data_from_pixbuf (unsigned char *dst, unsigned char const *src, int width, int height, int rowstride)
 go_cairo_convert_data_from_pixbuf: : a pointer to pixel data in pixbuf format : a pointer to pixel data in cairo format : image width : image height : data rowstride

Define Documentation

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

Function Documentation

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

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

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

References MULT.

Referenced by pixbuf_to_cairo().

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

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

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

References MULT.

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

go_cairo_emit_svg_path: : a cairo context : a SVG path

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

References emit_function_2(), emit_function_6(), and skip_spaces().

gboolean go_cairo_surface_is_vector ( cairo_surface_t const *  surface  ) 

References type.