public class Viewport
extends java.lang.Object
Transform each line segment's endpoints from viewplane coordinates
to viewport coordinates so that the view rectangle in the view plane
with
-1 <= x <= 1,
-1 <= y <= 1,
transforms into a viewport where
0.5 <= x < w + 0.5
0.5 <= y < h + 0.5
where w = number of horizontal pixels in the viewport,
h = number of vertical pixels in the viewport.
The goal of this transformation is to put a logical pixel with
integer coordinates at the center of each square physical pixel.
The logical pixel with integer coordinates (m, n) represents the
square pixel with
m - 0.5 <= x < m + 0.5,
n - 0.5 <= y < n + 0.5.
Notice that logical pixel integer coordinates (m.n) have
1 <= m <= w
1 <= n <= h.