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)>
Fri, 22 Apr 2016 07:33:23 +0000 (09:33 +0200)
commitb782bd1af9ba9d45eb6a3f33f546d441b68479a0
tree4599304c3fcafd560b915856cde52c8550e35890
parenta7395b43aa2a987286f027b7a729136b773ad6e1
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