MATH: improve type support for viewport argument