diff options
author | 2007-09-11 20:30:38 +0000 | |
---|---|---|
committer | 2007-09-11 20:30:38 +0000 | |
commit | c0011fa5d91503326649901cc88e01391fdcbdc2 (patch) | |
tree | 676cbf0345a6a159990480eeabedb388901897db /media-gfx/tuxpaint/files | |
parent | Stable on amd64 wrt bug #186219. (diff) | |
download | gentoo-2-c0011fa5d91503326649901cc88e01391fdcbdc2.tar.gz gentoo-2-c0011fa5d91503326649901cc88e01391fdcbdc2.tar.bz2 gentoo-2-c0011fa5d91503326649901cc88e01391fdcbdc2.zip |
Added patch to fix printing issue (bug #191987)
(Portage version: 2.1.3.9)
Diffstat (limited to 'media-gfx/tuxpaint/files')
-rw-r--r-- | media-gfx/tuxpaint/files/digest-tuxpaint-0.9.17-r1 | 3 | ||||
-rw-r--r-- | media-gfx/tuxpaint/files/tuxpaint-0.9.17-printing.patch | 44 |
2 files changed, 47 insertions, 0 deletions
diff --git a/media-gfx/tuxpaint/files/digest-tuxpaint-0.9.17-r1 b/media-gfx/tuxpaint/files/digest-tuxpaint-0.9.17-r1 new file mode 100644 index 000000000000..e1777f0d1869 --- /dev/null +++ b/media-gfx/tuxpaint/files/digest-tuxpaint-0.9.17-r1 @@ -0,0 +1,3 @@ +MD5 e98e4f1b3421ffcb0e1a1cbbf7c93dc4 tuxpaint-0.9.17.tar.gz 7570223 +RMD160 c7cf3636875cad87646cda4df978f9adbbf18630 tuxpaint-0.9.17.tar.gz 7570223 +SHA256 d01159625fa475739f79f6a5cb2a7dd65e486d165c52d6d8d56cf5222a6fe1ad tuxpaint-0.9.17.tar.gz 7570223 diff --git a/media-gfx/tuxpaint/files/tuxpaint-0.9.17-printing.patch b/media-gfx/tuxpaint/files/tuxpaint-0.9.17-printing.patch new file mode 100644 index 000000000000..63fc8912656f --- /dev/null +++ b/media-gfx/tuxpaint/files/tuxpaint-0.9.17-printing.patch @@ -0,0 +1,44 @@ +diff -NurdpB tuxpaint-0.9.17/src/postscript_print.c tuxpaint-0.9.17-patched/src/postscript_print.c +--- tuxpaint-0.9.17/src/postscript_print.c 2007-06-25 13:00:50.000000000 -0500 ++++ tuxpaint-0.9.17-patched/src/postscript_print.c 2007-09-10 17:46:06.000000000 -0500 +@@ -63,6 +63,19 @@ + + #define my_min(x,y) ((x < y) ? (x) : (y)) + ++int f2int(float f); ++int f2dec(float f); ++ ++int f2int(float f) ++{ ++ return ((int)f); ++} ++ ++int f2dec(float f) ++{ ++ return (int)((f - f2int(f)) * 100); ++} ++ + /* Actually save the PostScript data to the file stream: */ + int do_ps_save(FILE * fi, + // const char *restrict const fname, +@@ -234,14 +247,16 @@ int do_ps_save(FILE * fi, + /* 'translate' moves the user space origin to a new position with + respect to the current page, leaving the orientation of the axes and + the unit lengths unchanged. */ +- fprintf(fi, "%.2f %.2f translate\n", tlate_x, tlate_y); ++ fprintf(fi, "%d.%02d %d.%02d translate\n", ++ f2int(tlate_x), f2dec(tlate_x), ++ f2int(tlate_y), f2dec(tlate_y)); + + /* 'scale' modifies the unit lengths independently along the current + x and y axes, leaving the origin location and the orientation of the + axes unchanged. */ +- fprintf(fi, "%.2f %.2f scale\n", +- (float) printed_img_w * scale, +- (float) printed_img_h * scale); ++ fprintf(fi, "%d.%02d %d.%02d scale\n", ++ f2int(printed_img_w * scale), f2dec(printed_img_w * scale), ++ f2int(printed_img_h * scale), f2dec(printed_img_h * scale)); + + /* Rotate the image */ + if (rotate) |