Correct drawing in different file formats