Author: mir3x Date: Sun Feb 12 20:17:40 2017 New Revision: 35022 URL: http://svn.gna.org/viewcvs/freeciv?rev=35022&view=rev Log: Gtk2 client - crop scaled hex sprites bigger by 1 pixel.
See gna patch #8111 Modified: branches/S3_0/client/gui-gtk-2.0/sprite.c Modified: branches/S3_0/client/gui-gtk-2.0/sprite.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S3_0/client/gui-gtk-2.0/sprite.c?rev=35022&r1=35021&r2=35022&view=diff ============================================================================== --- branches/S3_0/client/gui-gtk-2.0/sprite.c (original) +++ branches/S3_0/client/gui-gtk-2.0/sprite.c Sun Feb 12 20:17:40 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" @@ -82,8 +85,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