• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

go-cairo.h

Go to the documentation of this file.
00001 /* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
00002 /*
00003  * go-cairo.c
00004  *
00005  * Copyright (C) 2003-2004 Jody Goldberg (jody@gnome.org)
00006  * Copyright (C) 2000 Eazel, Inc.
00007  *
00008  * This program is free software; you can redistribute it and/or
00009  * modify it under the terms of version 2 of the GNU General Public
00010  * License as published by the Free Software Foundation.
00011  *
00012  * This program is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU General Public License
00018  * along with this program; if not, write to the Free Software
00019  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
00020  * USA
00021  *
00022  * Author: Raph Levien <raph@artofcode.com>
00023  */
00024 
00025 #ifndef GO_CAIRO_H
00026 #define GO_CAIRO_H
00027 
00028 #include <cairo.h>
00029 #include <glib.h>
00030 #include <math.h>
00031 
00032 G_BEGIN_DECLS
00033 
00034 /* This is a workaround for a cairo bug, due to its internal
00035  * handling of coordinates (16.16 fixed point). */
00036 #define GO_CAIRO_CLAMP(x) CLAMP((x),-15000,15000)
00037 #define GO_CAIRO_CLAMP_SNAP(x,even) GO_CAIRO_CLAMP(even ? floor (x + .5):floor (x) + .5)
00038 
00039 void     go_cairo_emit_svg_path         (cairo_t *cr, char const *path);
00040 gboolean go_cairo_surface_is_vector         (cairo_surface_t const *surface);
00041 void     go_cairo_convert_data_to_pixbuf    (unsigned char *dst, unsigned char const *src,
00042                          int width, int height, int rowstride);
00043 void     go_cairo_convert_data_from_pixbuf  (unsigned char *dst, unsigned char const *src,
00044                          int width, int height, int rowstride);
00045 
00046 G_END_DECLS
00047 
00048 #endif /* GO_CAIRO_H */

Generated on Wed Mar 5 2014 for AbiWord by  doxygen 1.7.1