Scale the rectangle fillRect drawing width by devicePixelRatio for HiDPI displays (height uses some tricks so it does not need changing). See issue #456