Remove magic number

Remove magic number "2" for retina and support any ratios