]> git.pld-linux.org Git - packages/gnuplot.git/blame - gnuplot-round.patch
- massive attack s/pld.org.pl/pld-linux.org/
[packages/gnuplot.git] / gnuplot-round.patch
CommitLineData
0710045e 1--- gnuplot-3.7.1/graphics.c.round Wed Sep 15 09:30:29 1999
2+++ gnuplot-3.7.1/graphics.c Wed Jun 6 15:59:07 2001
3@@ -583,7 +583,8 @@
4 /* compute ytop from the various components
5 * unless tmargin is explicitly specified */
6
7- ytop = (int) ((ysize + yoffset) * (t->ymax));
8+ /* HBB 20010118: fix round-off bug */
9+ ytop = (int) (0.5 + (ysize + yoffset) * (t->ymax));
10
11 if (tmargin < 0) {
12 int top_margin = x2label_textheight + title_textheight;
13@@ -668,7 +669,7 @@
14 /* compute ybot from the various components
15 * unless bmargin is explicitly specified */
16
17- ybot = (int) ((t->ymax) * yoffset);
18+ ybot = (int) (0.5 + (t->ymax) * yoffset);
19
20 if (bmargin < 0) {
21 ybot += xtic_height + xtic_textheight;
22@@ -844,7 +845,7 @@
23 /* compute xleft from the various components
24 * unless lmargin is explicitly specified */
25
26- xleft = (int) ((t->xmax) * xoffset);
27+ xleft = (int) (0.5 + (t->xmax) * xoffset);
28
29 if (lmargin < 0) {
30 xleft += (timelabel_textwidth > ylabel_textwidth ? timelabel_textwidth : ylabel_textwidth)
31@@ -905,7 +906,7 @@
32 /* compute xright from the various components
33 * unless rmargin is explicitly specified */
34
35- xright = (int) ((t->xmax) * (xsize + xoffset));
36+ xright = (int) (0.5 + (t->xmax) * (xsize + xoffset));
37
38 if (rmargin < 0) {
39 /* xright -= y2label_textwidth + y2tic_width + y2tic_textwidth; */
This page took 0.029519 seconds and 4 git commands to generate.