Fix centerToParent method to set screen pixel integral values

The division is now done with floats, which allows for more accurate
centering as integer division is no longer used, but still maintains
pixel integral results based on the device’s screen scale (to avoid
subpixel rendering).