[composer] Hard code drawing a maximum of 1000 horizontal or vertical grid lines. Prevents hangs if grid settings are poorly chosen, resulting in millions of grid lines