Here I tried to correct some of the rounding behaviour of KisPainter which would produce erroneous results for negative coordinates, most of which are truncating floating points instead of flooring them. I also removed some redundant conversions and rounding. Some of the code already does nearest rounding so I did not touch them.
There shouldn't be any regressions regarding positive coordinates, but I can't tell if this fixes all the negative coordinates rounding bugs of KisPainter. All I can tell is that this fixes the pixel brush offset (https://bugs.kde.org/show_bug.cgi?id=367943).