implemented new pixel ratio logic, which covers all drawing cases using a canvas context.  The new logic also has better performance than the previous