refactored pixel ratio scale logic