Author: mir3x
Date: Sun Feb 12 20:17:30 2017
New Revision: 35021

URL: http://svn.gna.org/viewcvs/freeciv?rev=35021&view=rev
Log:
Gtk2 client - crop scaled hex sprites bigger by 1 pixel.

See gna patch #8111


Modified:
    branches/S2_6/client/gui-gtk-2.0/sprite.c

Modified: branches/S2_6/client/gui-gtk-2.0/sprite.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-2.0/sprite.c?rev=35021&r1=35020&r2=35021&view=diff
==============================================================================
--- branches/S2_6/client/gui-gtk-2.0/sprite.c   (original)
+++ branches/S2_6/client/gui-gtk-2.0/sprite.c   Sun Feb 12 20:17:30 2017
@@ -20,6 +20,9 @@
 #include "mem.h"
 #include "math.h"
 #include "shared.h"
+
+/* client */
+#include "tilespec.h"
 
 /* client/gtk-2.0 */
 #include "colors.h"
@@ -80,8 +83,12 @@
     } else {
       interp_type = GDK_INTERP_NEAREST;
     }
-    mypixbuf = gdk_pixbuf_scale_simple(sub, ceil(width *scale),
-                                       ceil(height * scale),
+    int hex = 0;
+    if (tileset_hex_height(tileset) > 0 || tileset_hex_width(tileset) > 0) {
+      hex = 1;
+    }
+    mypixbuf = gdk_pixbuf_scale_simple(sub, ceil(width *scale) + hex,
+                                       ceil(height * scale) + hex,
                                        interp_type);
   }
   g_object_unref(sub);


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to