* ltmain.sh:
* src/grr_board_view.c:
* src/grr_icon.c: (_grr_icon_init), (grr_icon_draw):
* src/grr_icon.h:
* src/grrobot.c:
Switch from xsvg to svg-cairo
+2003-12-25 Keith Packard <keithp@keithp.com>
+
+ * configure.in:
+ * ltmain.sh:
+ * src/grr_board_view.c:
+ * src/grr_icon.c: (_grr_icon_init), (grr_icon_draw):
+ * src/grr_icon.h:
+ * src/grrobot.c:
+ Switch from xsvg to svg-cairo
+
2003-11-11 Carl Worth <cworth@isi.edu>
* src/grrobot.c (grr_game_read_notices): Exit cleanly: need to
2003-11-11 Carl Worth <cworth@isi.edu>
* src/grrobot.c (grr_game_read_notices): Exit cleanly: need to
dnl ===========================================================================
dnl ===========================================================================
-PKG_CHECK_MODULES(GRROBOT, gtk+-2.0 libxsvg librr cairo >= 0.1.1)
+PKG_CHECK_MODULES(GRROBOT, gtk+-2.0 libsvg-cairo librr cairo >= 0.1.1)
AC_SUBST(GRROBOT_CFLAGS)
AC_SUBST(GRROBOT_LIBS)
AC_SUBST(GRROBOT_CFLAGS)
AC_SUBST(GRROBOT_LIBS)
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Check that we have a working $echo.
if test "X$1" = X--no-reexec; then
# Discard the --no-reexec flag, and continue.
# Check that we have a working $echo.
if test "X$1" = X--no-reexec; then
# Discard the --no-reexec flag, and continue.
#include <string.h>
#include <cairo.h>
#include <string.h>
#include <cairo.h>
#include <gtk/gtkmain.h>
#include <gtk/gtksignal.h>
#include <gtk/gtkmain.h>
#include <gtk/gtksignal.h>
static rr_status_t
_grr_icon_init (grr_icon_t *icon, char *name)
{
static rr_status_t
_grr_icon_init (grr_icon_t *icon, char *name)
{
+ svg_cairo_status_t status;
char *file, *buf;
int buflen;
char *file, *buf;
int buflen;
icon->surface_width = 0;
icon->surface_height = 0;
icon->surface_width = 0;
icon->surface_height = 0;
- status = xsvg_create (&icon->xsvg);
+ status = svg_cairo_create (&icon->svg_cairo);
if (status)
return RR_STATUS_NO_MEMORY;
file = _grr_icon_find_file (name);
if (file) {
if (status)
return RR_STATUS_NO_MEMORY;
file = _grr_icon_find_file (name);
if (file) {
- status = xsvg_parse_file (icon->xsvg, file);
- if (status == XSVG_STATUS_SUCCESS) {
+ status = svg_cairo_parse (icon->svg_cairo, file);
+ if (status == SVG_CAIRO_STATUS_SUCCESS) {
free (file);
return RR_STATUS_SUCCESS;
}
free (file);
return RR_STATUS_SUCCESS;
}
}
_grr_icon_find_buffer (name, &buf, &buflen);
}
_grr_icon_find_buffer (name, &buf, &buflen);
- status = xsvg_parse_buffer (icon->xsvg, buf, buflen);
+ status = svg_cairo_parse_buffer (icon->svg_cairo, buf, buflen);
if (status) {
fprintf (stderr, "Error parsing built-in SVG icon for: %s\n", name);
return RR_STATUS_PARSE_ERROR;
if (status) {
fprintf (stderr, "Error parsing built-in SVG icon for: %s\n", name);
return RR_STATUS_PARSE_ERROR;
void
grr_icon_draw (grr_icon_t *icon, cairo_t *xrs)
{
void
grr_icon_draw (grr_icon_t *icon, cairo_t *xrs)
{
+ svg_cairo_status_t status;
- status = xsvg_render (icon->xsvg, xrs);
+ status = svg_cairo_render (icon->svg_cairo, xrs);
- fprintf (stderr, "xsvg_render error\n");
+ fprintf (stderr, "svg_cairo_render error\n");
#define GRR_ICON_H
#include <rr.h>
#define GRR_ICON_H
#include <rr.h>
typedef struct grr_icon {
typedef struct grr_icon {
+ svg_cairo_t *svg_cairo;
cairo_surface_t *surface;
int surface_width;
cairo_surface_t *surface;
int surface_width;
-/* grrobot - Ricochet Robot using GTK+, libxsvg, and Cairo
+/* grrobot - Ricochet Robot using GTK+, libsvg-cairo, and cairo
*
* Copyright © 2003 Carl Worth
*
*
* Copyright © 2003 Carl Worth
*