Fix rounding when sizing 1x1 textures
authorH.G.Muller <hgm@hgm-xboard.(none)>
Fri, 22 Apr 2016 07:33:23 +0000 (09:33 +0200)
committerH.G.Muller <hgm@hgm-xboard.(none)>
Sun, 8 May 2016 12:06:33 +0000 (14:06 +0200)
commitab1c282bd6a29d283b62b60a217cd2d502b1c956
treea6d4a6de79d766f6d090ed7c8faedddf419385a2
parent872b20da5cf2cdde8652b372b65be2984a41d76c
Fix rounding when sizing 1x1 textures

When 1x1 textures were sized to the actual square size, this could lead
to bitmaps that were 1 pixel too small, presumably because of rounding.
We now add 0.99 pixel to the desired size of the texture image before
calculating the scaling factor (in floating arithmetic) that has to be
passed to the cairo scaling routine, and this seems to solve the problem.
draw.c