gcompris r3512 - branches/gcomprixogoo/src/memory-activity
- From: bcoudoin svn gnome org
- To: svn-commits-list gnome org
- Subject: gcompris r3512 - branches/gcomprixogoo/src/memory-activity
- Date: Sat, 30 Aug 2008 21:04:58 +0000 (UTC)
Author: bcoudoin
Date: Sat Aug 30 21:04:57 2008
New Revision: 3512
URL: http://svn.gnome.org/viewvc/gcompris?rev=3512&view=rev
Log:
fixed scaling issue
Modified:
branches/gcomprixogoo/src/memory-activity/memory.c
Modified: branches/gcomprixogoo/src/memory-activity/memory.c
==============================================================================
--- branches/gcomprixogoo/src/memory-activity/memory.c (original)
+++ branches/gcomprixogoo/src/memory-activity/memory.c Sat Aug 30 21:04:57 2008
@@ -1175,8 +1175,8 @@
{
MemoryItem *memoryItem;
gint x, y;
- gint height, width;
- gint height2, width2;
+ double height, width;
+ double height2, width2;
GdkPixbuf *pixmap = NULL;
// Calc width and height of one card
@@ -1279,9 +1279,10 @@
pixmap,
0,
0,
- "width", (double) width2,
- "height", (double) height2,
NULL);
+ goo_canvas_item_scale(memoryItem->backcardItem,
+ width2 / gdk_pixbuf_get_width(pixmap),
+ height2 / gdk_pixbuf_get_height(pixmap));
gdk_pixbuf_unref(pixmap);
if (currentUiMode != UIMODE_SOUND){
@@ -1291,9 +1292,10 @@
pixmap,
0,
0,
- "width", (double) width2,
- "height", (double) height2,
NULL);
+ goo_canvas_item_scale(memoryItem->framecardItem,
+ (width2 / gdk_pixbuf_get_width(pixmap)),
+ (height2 / gdk_pixbuf_get_height(pixmap)));
g_object_set (memoryItem->framecardItem, "visibility", GOO_CANVAS_ITEM_INVISIBLE, NULL);
gdk_pixbuf_unref(pixmap);
}
@@ -1309,9 +1311,10 @@
pixmap,
0,
0,
- "width", (double) width2,
- "height", (double) height2,
NULL);
+ goo_canvas_item_scale(memoryItem->frontcardItem,
+ (width2 / gdk_pixbuf_get_width(pixmap)),
+ (height2 / gdk_pixbuf_get_height(pixmap)));
gdk_pixbuf_unref(pixmap);
}
else {
@@ -1325,8 +1328,6 @@
gdk_pixbuf_get_width(pixmap))/2,
(height2-
gdk_pixbuf_get_height(pixmap))/2,
- "width", (double) gdk_pixbuf_get_width(pixmap),
- "height", (double) gdk_pixbuf_get_height(pixmap),
NULL);
gdk_pixbuf_unref(pixmap);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]