Added hack for "exact pixelization" when scaled

When trying to maintain unscaled UI, depending on the size of the window
the drawing was scaled incorrectly, causing slight distortion of images
and shapes. To fix this, a small offset was added to the viewport
calculation.