gcompris r3605 - in branches/gcomprixogoo: . src/erase-activity src/gcompris src/goocanvas/src src/magic_hat_minus-activity src/maze-activity src/money-activity src/paratrooper-activity src/planegame-activity src/reversecount-activity src/smallnumbers-activity
- From: bcoudoin svn gnome org
- To: svn-commits-list gnome org
- Subject: gcompris r3605 - in branches/gcomprixogoo: . src/erase-activity src/gcompris src/goocanvas/src src/magic_hat_minus-activity src/maze-activity src/money-activity src/paratrooper-activity src/planegame-activity src/reversecount-activity src/smallnumbers-activity
- Date: Sun, 9 Nov 2008 15:19:35 +0000 (UTC)
Author: bcoudoin
Date: Sun Nov 9 15:19:35 2008
New Revision: 3605
URL: http://svn.gnome.org/viewvc/gcompris?rev=3605&view=rev
Log:
API cleanup, now our svg item has the same API signature
as native goocanvas items: goo_canvas_svg_new()
Added:
branches/gcomprixogoo/src/goocanvas/src/goocanvassvg.c (contents, props changed)
- copied, changed from r3603, /branches/gcomprixogoo/src/goocanvas/src/svg-item.c
branches/gcomprixogoo/src/goocanvas/src/goocanvassvg.h (contents, props changed)
- copied, changed from r3603, /branches/gcomprixogoo/src/goocanvas/src/svg-item.h
Removed:
branches/gcomprixogoo/src/goocanvas/src/svg-item.c
branches/gcomprixogoo/src/goocanvas/src/svg-item.h
Modified:
branches/gcomprixogoo/ChangeLog
branches/gcomprixogoo/src/erase-activity/erase.c
branches/gcomprixogoo/src/gcompris/about.c
branches/gcomprixogoo/src/gcompris/config.c
branches/gcomprixogoo/src/gcompris/dialog.c
branches/gcomprixogoo/src/gcompris/gcompris.c
branches/gcomprixogoo/src/gcompris/gcompris_confirm.c
branches/gcomprixogoo/src/gcompris/help.c
branches/gcomprixogoo/src/goocanvas/src/Makefile.am
branches/gcomprixogoo/src/goocanvas/src/goocanvas.h
branches/gcomprixogoo/src/magic_hat_minus-activity/magic_hat.c
branches/gcomprixogoo/src/maze-activity/maze.c
branches/gcomprixogoo/src/money-activity/money.c
branches/gcomprixogoo/src/money-activity/money_widget.c
branches/gcomprixogoo/src/paratrooper-activity/paratrooper.c
branches/gcomprixogoo/src/planegame-activity/planegame.c
branches/gcomprixogoo/src/reversecount-activity/reversecount.c
branches/gcomprixogoo/src/smallnumbers-activity/smallnumbers.c
Modified: branches/gcomprixogoo/src/erase-activity/erase.c
==============================================================================
--- branches/gcomprixogoo/src/erase-activity/erase.c (original)
+++ branches/gcomprixogoo/src/erase-activity/erase.c Sun Nov 9 15:19:35 2008
@@ -371,7 +371,7 @@
assert(CoverPixmap[current_layer]);
GooCanvasItem *item =
- goo_svg_item_new (boardRootItem,
+ goo_canvas_svg_new (boardRootItem,
CoverPixmap[current_layer],
NULL);
rsvg_handle_get_dimensions(CoverPixmap[current_layer], &dimension);
Modified: branches/gcomprixogoo/src/gcompris/about.c
==============================================================================
--- branches/gcomprixogoo/src/gcompris/about.c (original)
+++ branches/gcomprixogoo/src/gcompris/about.c Sun Nov 9 15:19:35 2008
@@ -74,7 +74,7 @@
rsvg_handle_get_dimensions(svg_handle, &dimension);
x_start = (BOARDWIDTH - dimension.width)/2;
y_start = (BOARDHEIGHT - dimension.height)/2;
- item = goo_svg_item_new (rootitem, svg_handle, NULL);
+ item = goo_canvas_svg_new (rootitem, svg_handle, NULL);
goo_canvas_item_translate(item, x_start, y_start);
y = y_start + dimension.height;
g_object_unref (svg_handle);
Modified: branches/gcomprixogoo/src/gcompris/config.c
==============================================================================
--- branches/gcomprixogoo/src/gcompris/config.c (original)
+++ branches/gcomprixogoo/src/gcompris/config.c Sun Nov 9 15:19:35 2008
@@ -177,7 +177,7 @@
rsvg_handle_get_dimensions(svg_handle, &dimension);
x_start = (BOARDWIDTH - dimension.width)/2;
y_start = (BOARDHEIGHT - dimension.height)/2;
- item = goo_svg_item_new (rootitem, svg_handle, NULL);
+ item = goo_canvas_svg_new (rootitem, svg_handle, NULL);
goo_canvas_item_translate(item, x_start, y_start);
y = y_start + dimension.height;
g_object_unref (svg_handle);
@@ -206,7 +206,7 @@
display_previous_next(x_start, y_start, "locale_previous", "locale_next");
- item_locale_flag = goo_svg_item_new (rootitem,
+ item_locale_flag = goo_canvas_svg_new (rootitem,
rsvg_handle_new(),
NULL);
y_flag_start = y_start - gdk_pixbuf_get_width(pixmap_checked)/2;
Modified: branches/gcomprixogoo/src/gcompris/dialog.c
==============================================================================
--- branches/gcomprixogoo/src/gcompris/dialog.c (original)
+++ branches/gcomprixogoo/src/gcompris/dialog.c Sun Nov 9 15:19:35 2008
@@ -77,7 +77,7 @@
NULL);
svg_handle = gc_skin_rsvg_load("dialogbox.svgz");
- itemDialogText = goo_svg_item_new (rootDialogItem, svg_handle, NULL);
+ itemDialogText = goo_canvas_svg_new (rootDialogItem, svg_handle, NULL);
RsvgDimensionData dimension;
rsvg_handle_get_dimensions(svg_handle, &dimension);
Modified: branches/gcomprixogoo/src/gcompris/gcompris.c
==============================================================================
--- branches/gcomprixogoo/src/gcompris/gcompris.c (original)
+++ branches/gcomprixogoo/src/gcompris/gcompris.c Sun Nov 9 15:19:35 2008
@@ -492,7 +492,7 @@
"rsvg-handle", rsvg_handle,
NULL);
else
- backgroundsvgimg = goo_svg_item_new (parent,
+ backgroundsvgimg = goo_canvas_svg_new (parent,
rsvg_handle,
NULL);
goo_canvas_item_lower(backgroundsvgimg, NULL);
Modified: branches/gcomprixogoo/src/gcompris/gcompris_confirm.c
==============================================================================
--- branches/gcomprixogoo/src/gcompris/gcompris_confirm.c (original)
+++ branches/gcomprixogoo/src/gcompris/gcompris_confirm.c Sun Nov 9 15:19:35 2008
@@ -196,7 +196,7 @@
NULL);
svg_handle = gc_skin_rsvg_load("dialog_help.svgz");
- item = goo_svg_item_new (rootitem, svg_handle, NULL);
+ item = goo_canvas_svg_new (rootitem, svg_handle, NULL);
RsvgDimensionData dimension;
rsvg_handle_get_dimensions(svg_handle, &dimension);
Modified: branches/gcomprixogoo/src/gcompris/help.c
==============================================================================
--- branches/gcomprixogoo/src/gcompris/help.c (original)
+++ branches/gcomprixogoo/src/gcompris/help.c Sun Nov 9 15:19:35 2008
@@ -119,7 +119,7 @@
x_start = (BOARDWIDTH - dimension.width)/2;
y_start = (BOARDHEIGHT - dimension.height)/2;
- item = goo_svg_item_new (rootitem, svg_handle, NULL);
+ item = goo_canvas_svg_new (rootitem, svg_handle, NULL);
goo_canvas_item_translate(item, x_start, y_start);
y = y_start + dimension.height;
g_object_unref (svg_handle);
Modified: branches/gcomprixogoo/src/goocanvas/src/Makefile.am
==============================================================================
--- branches/gcomprixogoo/src/goocanvas/src/Makefile.am (original)
+++ branches/gcomprixogoo/src/goocanvas/src/Makefile.am Sun Nov 9 15:19:35 2008
@@ -41,7 +41,7 @@
goocanvasutils.h \
goocanvaswidget.h \
goocanvas.h \
- svg-item.h
+ goocanvassvg.h
libgoocanvas_la_SOURCES = \
goocanvasatk.h \
@@ -64,7 +64,7 @@
goocanvasutils.c \
goocanvaswidget.c \
goocanvas.c \
- svg-item.c
+ goocanvassvg.c
libgoocanvas_extra_sources = \
$(libgoocanvas_public_headers) \
Modified: branches/gcomprixogoo/src/goocanvas/src/goocanvas.h
==============================================================================
--- branches/gcomprixogoo/src/goocanvas/src/goocanvas.h (original)
+++ branches/gcomprixogoo/src/goocanvas/src/goocanvas.h Sun Nov 9 15:19:35 2008
@@ -18,7 +18,7 @@
#include <goocanvastable.h>
#include <goocanvastext.h>
#include <goocanvaswidget.h>
-#include <svg-item.h>
+#include <goocanvassvg.h>
G_BEGIN_DECLS
Copied: branches/gcomprixogoo/src/goocanvas/src/goocanvassvg.c (from r3603, /branches/gcomprixogoo/src/goocanvas/src/svg-item.c)
==============================================================================
--- /branches/gcomprixogoo/src/goocanvas/src/svg-item.c (original)
+++ branches/gcomprixogoo/src/goocanvas/src/goocanvassvg.c Sun Nov 9 15:19:35 2008
@@ -2,31 +2,33 @@
* GooCanvas Demo. Copyright (C) 2006 Damon Chaplin.
* Released under the GNU LGPL license. See COPYING for details.
*
- * svg-item.c - a simple svg item.
+ * goocanvassvg.c - a simple svg item.
*/
#include "goocanvas.h"
-#include "svg-item.h"
+#include "goocanvassvg.h"
enum {
PROP_0,
/* Convenience properties. */
- PROP_SVGHANDLE
+ PROP_SVGHANDLE,
+ PROP_SVG_ID
};
-static void goo_svg_item_set_property (GObject *object,
+static void goo_canvas_svg_finalize (GObject *object);
+static void goo_canvas_svg_set_property (GObject *object,
guint param_id,
const GValue *value,
GParamSpec *pspec);
-/* Use the GLib convenience macro to define the type. GooSvgItem is the
- class struct, goo_svg_item is the function prefix, and our class is a
+/* Use the GLib convenience macro to define the type. GooCanvasSvg is the
+ class struct, goo_canvas_svg is the function prefix, and our class is a
subclass of GOO_TYPE_CANVAS_ITEM_SIMPLE. */
-G_DEFINE_TYPE (GooSvgItem, goo_svg_item, GOO_TYPE_CANVAS_ITEM_SIMPLE)
+G_DEFINE_TYPE (GooCanvasSvg, goo_canvas_svg, GOO_TYPE_CANVAS_ITEM_SIMPLE)
static void
-goo_svg_item_install_common_properties (GObjectClass *gobject_class)
+goo_canvas_svg_install_common_properties (GObjectClass *gobject_class)
{
g_object_class_install_property (gobject_class, PROP_SVGHANDLE,
g_param_spec_object ("rsvg-handle",
@@ -34,15 +36,23 @@
"The RsvgHandle to display",
RSVG_TYPE_HANDLE,
G_PARAM_WRITABLE));
+ /* Convenience properties - writable only. */
+ g_object_class_install_property (gobject_class, PROP_SVG_ID,
+ g_param_spec_string ("svg-id",
+ "SVG ID",
+ "The svg id to display, NULL to display all",
+ NULL,
+ G_PARAM_WRITABLE));
}
/* The standard object initialization function. */
static void
-goo_svg_item_init (GooSvgItem *svg_item)
+goo_canvas_svg_init (GooCanvasSvg *canvas_svg)
{
- svg_item->width = 0.0;
- svg_item->height = 0.0;
+ canvas_svg->width = 0.0;
+ canvas_svg->height = 0.0;
+ canvas_svg->id = NULL;
}
@@ -50,26 +60,26 @@
parent argument and end with a variable list of object properties to fit
in with the standard canvas items. */
GooCanvasItem*
-goo_svg_item_new (GooCanvasItem *parent,
+goo_canvas_svg_new (GooCanvasItem *parent,
RsvgHandle *svg_handle,
...)
{
GooCanvasItem *item;
- GooSvgItem *svg_item;
+ GooCanvasSvg *canvas_svg;
const char *first_property;
va_list var_args;
RsvgDimensionData dimension_data;
- item = g_object_new (GOO_TYPE_SVG_ITEM, NULL);
+ item = g_object_new (GOO_TYPE_CANVAS_SVG, NULL);
- svg_item = (GooSvgItem*) item;
- svg_item->svg_handle = svg_handle;
+ canvas_svg = (GooCanvasSvg*) item;
+ canvas_svg->svg_handle = svg_handle;
if(svg_handle)
{
g_object_ref (svg_handle);
rsvg_handle_get_dimensions (svg_handle, &dimension_data);
- svg_item->width = dimension_data.width;
- svg_item->height = dimension_data.height;
+ canvas_svg->width = dimension_data.width;
+ canvas_svg->height = dimension_data.height;
}
va_start (var_args, svg_handle);
@@ -93,36 +103,55 @@
shape. It should calculate its new bounds in its own coordinate space,
storing them in simple->bounds. */
static void
-goo_svg_item_update (GooCanvasItemSimple *simple,
+goo_canvas_svg_update (GooCanvasItemSimple *simple,
cairo_t *cr)
{
- GooSvgItem *svg_item = (GooSvgItem*) simple;
+ GooCanvasSvg *canvas_svg = (GooCanvasSvg*) simple;
/* Compute the new bounds. */
simple->bounds.x1 = 0;
simple->bounds.y1 = 0;
- simple->bounds.x2 = svg_item->width;
- simple->bounds.y2 = svg_item->height;
+ simple->bounds.x2 = canvas_svg->width;
+ simple->bounds.y2 = canvas_svg->height;
}
/* The paint method. This should draw the item on the given cairo_t, using
the item's own coordinate space. */
static void
-goo_svg_item_paint (GooCanvasItemSimple *simple,
+goo_canvas_svg_paint (GooCanvasItemSimple *simple,
cairo_t *cr,
const GooCanvasBounds *bounds)
{
- GooSvgItem *svg_item = (GooSvgItem*) simple;
+ GooCanvasSvg *canvas_svg = (GooCanvasSvg*) simple;
- if(svg_item->svg_handle)
- rsvg_handle_render_cairo (svg_item->svg_handle, cr);
+ if(canvas_svg->svg_handle)
+ rsvg_handle_render_cairo_sub (canvas_svg->svg_handle, cr,
+ canvas_svg->id);
}
static void
-goo_svg_item_set_common_property (GObject *object,
- GooSvgItem *svg_item,
+goo_canvas_svg_finalize (GObject *object)
+{
+ GooCanvasSvg *canvas_svg = (GooCanvasSvg*) object;
+
+ /* Free our data if we didn't have a model. */
+ if(canvas_svg->svg_handle)
+ g_object_unref (canvas_svg->svg_handle);
+ canvas_svg->svg_handle = NULL;
+
+ if (canvas_svg->id)
+ g_free(canvas_svg->id);
+ canvas_svg->id = NULL;
+
+ G_OBJECT_CLASS (goo_canvas_svg_parent_class)->finalize (object);
+}
+
+
+static void
+goo_canvas_svg_set_common_property (GObject *object,
+ GooCanvasSvg *canvas_svg,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
@@ -134,13 +163,19 @@
{
case PROP_SVGHANDLE:
svg_handle = g_value_get_object (value);
- if(svg_item->svg_handle)
- g_object_unref (svg_item->svg_handle);
+ if(canvas_svg->svg_handle)
+ g_object_unref (canvas_svg->svg_handle);
g_object_ref (svg_handle);
- svg_item->svg_handle = svg_handle;
+ canvas_svg->svg_handle = svg_handle;
rsvg_handle_get_dimensions (svg_handle, &dimension_data);
- svg_item->width = dimension_data.width;
- svg_item->height = dimension_data.height;
+ canvas_svg->width = dimension_data.width;
+ canvas_svg->height = dimension_data.height;
+ break;
+ case PROP_SVG_ID:
+ if (!g_value_get_string (value))
+ canvas_svg->id = NULL;
+ else
+ canvas_svg->id = g_value_dup_string(value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -150,13 +185,13 @@
static void
-goo_svg_item_set_property (GObject *object,
+goo_canvas_svg_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
GooCanvasItemSimple *simple = (GooCanvasItemSimple*) object;
- GooSvgItem *image = (GooSvgItem*) object;
+ GooCanvasSvg *image = (GooCanvasSvg*) object;
if (simple->model)
{
@@ -164,7 +199,7 @@
return;
}
- goo_svg_item_set_common_property (object, image, prop_id,
+ goo_canvas_svg_set_common_property (object, image, prop_id,
value, pspec);
goo_canvas_item_simple_changed (simple, TRUE);
}
@@ -175,7 +210,7 @@
coordinate space) is within the item. If it is it should return TRUE,
otherwise it should return FALSE. */
static gboolean
-goo_svg_item_is_item_at (GooCanvasItemSimple *simple,
+goo_canvas_svg_is_item_at (GooCanvasItemSimple *simple,
gdouble x,
gdouble y,
cairo_t *cr,
@@ -185,22 +220,22 @@
return TRUE;
}
-
/* The class initialization function. Here we set the class' update(), paint()
and is_item_at() methods. */
static void
-goo_svg_item_class_init (GooSvgItemClass *klass)
+goo_canvas_svg_class_init (GooCanvasSvgClass *klass)
{
GObjectClass *gobject_class = (GObjectClass*) klass;
GooCanvasItemSimpleClass *simple_class = (GooCanvasItemSimpleClass*) klass;
- gobject_class->set_property = goo_svg_item_set_property;
+ gobject_class->set_property = goo_canvas_svg_set_property;
- simple_class->simple_update = goo_svg_item_update;
- simple_class->simple_paint = goo_svg_item_paint;
- simple_class->simple_is_item_at = goo_svg_item_is_item_at;
+ gobject_class->finalize = goo_canvas_svg_finalize;
+ simple_class->simple_update = goo_canvas_svg_update;
+ simple_class->simple_paint = goo_canvas_svg_paint;
+ simple_class->simple_is_item_at = goo_canvas_svg_is_item_at;
- goo_svg_item_install_common_properties (gobject_class);
+ goo_canvas_svg_install_common_properties (gobject_class);
}
Copied: branches/gcomprixogoo/src/goocanvas/src/goocanvassvg.h (from r3603, /branches/gcomprixogoo/src/goocanvas/src/svg-item.h)
==============================================================================
--- /branches/gcomprixogoo/src/goocanvas/src/svg-item.h (original)
+++ branches/gcomprixogoo/src/goocanvas/src/goocanvassvg.h Sun Nov 9 15:19:35 2008
@@ -2,10 +2,10 @@
* GooCanvas Demo. Copyright (C) 2006 Damon Chaplin.
* Released under the GNU LGPL license. See COPYING for details.
*
- * svg-item.c - a simple svg item.
+ * goocanvassvg.c - a simple svg item.
*/
-#ifndef __GOO_SVG_ITEM_H__
-#define __GOO_SVG_ITEM_H__
+#ifndef __GOO_CANVAS_SVG_H__
+#define __GOO_CANVAS_SVG_H__
#include <librsvg/rsvg.h>
#include <librsvg/rsvg-cairo.h>
@@ -15,38 +15,39 @@
G_BEGIN_DECLS
-#define GOO_TYPE_SVG_ITEM (goo_svg_item_get_type ())
-#define GOO_SVG_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GOO_TYPE_SVG_ITEM, GooSvgItem))
-#define GOO_SVG_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GOO_TYPE_SVG_ITEM, GooSvgItemClass))
-#define GOO_IS_SVG_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GOO_TYPE_SVG_ITEM))
-#define GOO_IS_SVG_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GOO_TYPE_SVG_ITEM))
-#define GOO_SVG_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GOO_TYPE_SVG_ITEM, GooSvgItemClass))
+#define GOO_TYPE_CANVAS_SVG (goo_canvas_svg_get_type ())
+#define GOO_CANVAS_SVG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GOO_TYPE_CANVAS_SVG, GooCanvasSvg))
+#define GOO_CANVAS_SVG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GOO_TYPE_CANVAS_SVG, GooCanvasSvgClass))
+#define GOO_IS_CANVAS_SVG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GOO_TYPE_CANVAS_SVG))
+#define GOO_IS_CANVAS_SVG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GOO_TYPE_CANVAS_SVG))
+#define GOO_CANVAS_SVG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GOO_TYPE_CANVAS_SVG, GooCanvasSvgClass))
-typedef struct _GooSvgItem GooSvgItem;
-typedef struct _GooSvgItemClass GooSvgItemClass;
+typedef struct _GooCanvasSvg GooCanvasSvg;
+typedef struct _GooCanvasSvgClass GooCanvasSvgClass;
-struct _GooSvgItem
+struct _GooCanvasSvg
{
GooCanvasItemSimple parent_object;
RsvgHandle *svg_handle;
gdouble width, height;
+ gchar *id;
};
-struct _GooSvgItemClass
+struct _GooCanvasSvgClass
{
GooCanvasItemSimpleClass parent_class;
};
-GType goo_svg_item_get_type (void) G_GNUC_CONST;
+GType goo_canvas_svg_get_type (void) G_GNUC_CONST;
-GooCanvasItem* goo_svg_item_new (GooCanvasItem *parent,
- RsvgHandle *svg_handle,
- ...);
+GooCanvasItem* goo_canvas_svg_new (GooCanvasItem *parent,
+ RsvgHandle *svg_handle,
+ ...);
G_END_DECLS
-#endif /* __GOO_SVG_ITEM_H__ */
+#endif /* __GOO_CANVAS_SVG_H__ */
Modified: branches/gcomprixogoo/src/magic_hat_minus-activity/magic_hat.c
==============================================================================
--- branches/gcomprixogoo/src/magic_hat_minus-activity/magic_hat.c (original)
+++ branches/gcomprixogoo/src/magic_hat_minus-activity/magic_hat.c Sun Nov 9 15:19:35 2008
@@ -575,7 +575,7 @@
for (k = 0 ; k < nb_item ; k++)
{
- item = goo_svg_item_new (boardRootItem,
+ item = goo_canvas_svg_new (boardRootItem,
image, NULL);
goo_canvas_item_translate(item,
item_x,
Modified: branches/gcomprixogoo/src/maze-activity/maze.c
==============================================================================
--- branches/gcomprixogoo/src/maze-activity/maze.c (original)
+++ branches/gcomprixogoo/src/maze-activity/maze.c Sun Nov 9 15:19:35 2008
@@ -295,7 +295,7 @@
RsvgHandle *svg_handle = NULL;
gchar *filename = gc_file_find_absolute("maze/tux_top_south.svg");
svg_handle = rsvg_handle_new_from_file (filename, &error);
- tuxitem = goo_svg_item_new (tuxgroup, svg_handle,
+ tuxitem = goo_canvas_svg_new (tuxgroup, svg_handle,
NULL);
g_free(filename);
g_object_unref (svg_handle);
Modified: branches/gcomprixogoo/src/money-activity/money.c
==============================================================================
--- branches/gcomprixogoo/src/money-activity/money.c (original)
+++ branches/gcomprixogoo/src/money-activity/money.c Sun Nov 9 15:19:35 2008
@@ -471,7 +471,7 @@
rsvg_handle_get_dimensions(svg_handle, &dimension);
- item = goo_svg_item_new ( boardRootItem,
+ item = goo_canvas_svg_new ( boardRootItem,
svg_handle,
NULL);
Modified: branches/gcomprixogoo/src/money-activity/money_widget.c
==============================================================================
--- branches/gcomprixogoo/src/money-activity/money_widget.c (original)
+++ branches/gcomprixogoo/src/money-activity/money_widget.c Sun Nov 9 15:19:35 2008
@@ -293,7 +293,7 @@
yratio = block_height / (dimension.height + BORDER_GAP);
ratio = yratio = MIN(xratio, yratio);
- item = goo_svg_item_new(moneyWidget->priv->rootItem,
+ item = goo_canvas_svg_new(moneyWidget->priv->rootItem,
svg_handle,
NULL);
Modified: branches/gcomprixogoo/src/paratrooper-activity/paratrooper.c
==============================================================================
--- branches/gcomprixogoo/src/paratrooper-activity/paratrooper.c (original)
+++ branches/gcomprixogoo/src/paratrooper-activity/paratrooper.c Sun Nov 9 15:19:35 2008
@@ -314,7 +314,7 @@
plane_x = -rsvg_dimension.width;
plane_y = 10;
- planeitem = goo_svg_item_new (planeroot,
+ planeitem = goo_canvas_svg_new (planeroot,
svg_handle,
NULL);
@@ -356,7 +356,7 @@
boat_y = BOARDHEIGHT - 100;
boat_landarea_y = boat_y + 20;
item = \
- goo_svg_item_new (boardRootItem,
+ goo_canvas_svg_new (boardRootItem,
svg_handle,
NULL);
goo_canvas_item_translate(item,
@@ -392,7 +392,7 @@
NULL);
paratrooperItem.paratrooper = \
- goo_svg_item_new (paratrooperItem.rootitem,
+ goo_canvas_svg_new (paratrooperItem.rootitem,
NULL,
NULL);
@@ -527,7 +527,7 @@
goo_canvas_group_new (parent,
NULL);
- item = goo_svg_item_new (root,
+ item = goo_canvas_svg_new (root,
svg_handle,
NULL);
Modified: branches/gcomprixogoo/src/planegame-activity/planegame.c
==============================================================================
--- branches/gcomprixogoo/src/planegame-activity/planegame.c (original)
+++ branches/gcomprixogoo/src/planegame-activity/planegame.c Sun Nov 9 15:19:35 2008
@@ -279,7 +279,7 @@
goo_canvas_item_translate(planeitem, plane_x, plane_y);
- item = goo_svg_item_new (planeitem,
+ item = goo_canvas_svg_new (planeitem,
svg_handle,
NULL);
@@ -461,7 +461,7 @@
BOARDWIDTH,
y);
- item = goo_svg_item_new (itemgroup,
+ item = goo_canvas_svg_new (itemgroup,
svg_handle,
NULL);
goo_canvas_item_scale(item, imageZoom, imageZoom);
Modified: branches/gcomprixogoo/src/reversecount-activity/reversecount.c
==============================================================================
--- branches/gcomprixogoo/src/reversecount-activity/reversecount.c (original)
+++ branches/gcomprixogoo/src/reversecount-activity/reversecount.c Sun Nov 9 15:19:35 2008
@@ -461,12 +461,12 @@
for(i=0; i<BOARDWIDTH; i+=block_width)
{
j=0;
- item = goo_svg_item_new (boardRootItem, svg_handle, NULL);
+ item = goo_canvas_svg_new (boardRootItem, svg_handle, NULL);
goo_canvas_item_translate(item, i, j);
goo_canvas_item_scale(item, xratio, yratio);
j=BOARDHEIGHT-BARHEIGHT-block_height;
- item = goo_svg_item_new (boardRootItem, svg_handle, NULL);
+ item = goo_canvas_svg_new (boardRootItem, svg_handle, NULL);
goo_canvas_item_translate(item, i, j);
goo_canvas_item_scale(item, xratio, yratio);
}
@@ -475,13 +475,13 @@
j += block_height)
{
i = 0;
- item = goo_svg_item_new (boardRootItem, svg_handle, NULL);
+ item = goo_canvas_svg_new (boardRootItem, svg_handle, NULL);
goo_canvas_item_translate(item, i, j);
goo_canvas_item_scale(item, xratio, yratio);
i = BOARDWIDTH - block_width;
- item = goo_svg_item_new (boardRootItem, svg_handle, NULL);
+ item = goo_canvas_svg_new (boardRootItem, svg_handle, NULL);
goo_canvas_item_translate(item, i, j);
goo_canvas_item_scale(item, xratio, yratio);
}
@@ -496,7 +496,7 @@
dice_area_x = BOARDWIDTH - block_width - rsvg_dimension.width - 20;
- item = goo_svg_item_new (boardRootItem, svg_handle, NULL);
+ item = goo_canvas_svg_new (boardRootItem, svg_handle, NULL);
goo_canvas_item_translate(item,
dice_area_x, block_height + 20);
@@ -515,7 +515,7 @@
i = dice_area_x + dice_width * d + 20;
j = block_height + 24 + d*7;
- item = goo_svg_item_new (boardRootItem, svg_handle, NULL);
+ item = goo_canvas_svg_new (boardRootItem, svg_handle, NULL);
goo_canvas_item_translate(item,
i, j);
@@ -551,7 +551,7 @@
tuxRootItem = goo_canvas_group_new (boardRootItem, NULL);
svg_handle = gc_rsvg_load("reversecount/tux_top_south.svgz");
- tuxItem = goo_svg_item_new (tuxRootItem, svg_handle, NULL);
+ tuxItem = goo_canvas_svg_new (tuxRootItem, svg_handle, NULL);
RsvgDimensionData dimension;
rsvg_handle_get_dimensions(svg_handle, &dimension);
Modified: branches/gcomprixogoo/src/smallnumbers-activity/smallnumbers.c
==============================================================================
--- branches/gcomprixogoo/src/smallnumbers-activity/smallnumbers.c (original)
+++ branches/gcomprixogoo/src/smallnumbers-activity/smallnumbers.c Sun Nov 9 15:19:35 2008
@@ -434,7 +434,7 @@
x = (double)(g_random_int()%(BOARDWIDTH-
(guint)(rsvg_dimension.width * imageZoom)*2));
- item = goo_svg_item_new (group_item, svg_handle, NULL);
+ item = goo_canvas_svg_new (group_item, svg_handle, NULL);
goo_canvas_item_translate(item,
x,
- (rsvg_dimension.height * imageZoom ));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]