Graphics Reference
In-Depth Information
Move. The rectangle centered at the origin has half its width/height on
either side of the y / x axis. The translation of T
W dc
2
H dc
2
moves the lower-
left corner of the rectangle to the origin, with the upper-right corner located
at
(
,
)
(
W dc ,
H dc )
. This is the definition of the DC space.
(
,
)
If we expand the operators in Equation (10.13), then, to transform a point
x wc
y wc
from our design space (WC) to a point
(
x dc ,
y dc )
on the device drawing area (DC),
W dc
W wc )+
W dc
2
x dc =((
x wc
cx wc )
,
(10.15)
H dc
H wc )+
H dc
2
y dc =((
y wc
cy wc
)
,
where
Device drawing area width
=
W dc ,
height
=
H dc ,
and
center
=(
cx wc ,
cy wc ) ,
WC window
=
width
=
W wc ,
H wc .
From Equation (10.15), we see that when the size of the device drawing remains
constant (i.e., W dc and H dc do not change), then the transformation from WC to
DC is governed by the parameters of the WC window as follows.
height
=
1. Center ( cx wc ,
cy wc ). Defines the location of the WC window. Intuitively,
by changing the center we are moving the WC window and thus should
observe different rectangular regions in the WC system, or panning of the
view. Tutorial 10.10 will examine panning in detail.
2. Dimension ( W wc H wc ). Defines the size of the WC window. Intuitively,
by changing the dimension, we increase/decrease the rectangular region
to be displayed. With a fixed-size UI drawing device, increasing the size
of the WC window means showing a larger amount of the WC system in
the fixed-size DC drawing area, or a zooming-out effect. With the same
logic, decreasing the size of the WC window creates a zooming-in effect.
Tutorial 10.11 will examine zooming in detail.
3. Ratio of scaling factors ( W dc
W wc
versus H dc
H wc ). We scale the width of the WC
window by W dc
W wc
and the height by H dc
H wc . Whenthesetwoscalingfactorsare
different, the proportion of the results in DC space will also be different
from that of the original WC space. For example, a square will be trans-
formed into a rectangle. Section 10.4.4 will examine this effect in detail.
Search WWH ::




Custom Search