Respect device density when drawing rectangular grid.