Removing the transform scale factor from the calculation results in incorrect rendering in some cases. There was a discussion about this a while ago:
It seems like Logic is the issue here as it is scaling the CGContext in addition to the backing scale of the screen. Is this only happening in Logic 10.5?