Graphics Reference
In-Depth Information
where
=
x
wc
y
wc
,
V
wc
V
ndc
=
V
wc
M
w
2
n
,
V
dc
=
V
ndc
M
n
2
d
,
or
V
dc
=
V
ndc
M
n
2
d
=
V
wc
M
w
2
n
M
n
2
d
.
If we let
M
w
2
d
=
M
w
2
n
M
n
2
d
,
(10.11)
then
V
dc
=
V
wc
M
w
2
d
.
(10.12)
Recall that
M
n
2
d
is defined by Equation (10.6) and that
M
w
2
n
is defined by Equa-
tion (10.10) (re-listing the two equations):
W
dc
2
H
dc
2
)
W
dc
2
H
dc
2
)
,
M
n
2
d
=
S
(
,
T
(
,
(
10
.
6
)
2
W
wc
,
2
H
wc
)
.
M
w
2
n
=
T
(
−
cx
wc
,−
cy
wc
)
S
(
(
10
.
10
)
In this way,
Consecutive scaling opera-
tors.
Two consecutive scaling
operators:
V
dc
=
V
wc
M
w
2
d
=
V
wc
M
w
2
n
M
n
2
d
S
(
s
x
1
,
s
y
1
)
S
(
s
x
2
,
s
y
2
)
have the same effect as scaling
once by the combined effect of
the scaling factors:
2
W
wc
,
2
H
wc
)
W
dc
2
H
dc
2
)
W
dc
2
H
dc
2
)
,
=
V
wc
T
(
−
cx
wc
,−
cy
wc
)
S
(
S
(
,
T
(
,
or
W
dc
W
wc
,
H
dc
H
wc
)
W
dc
2
H
dc
2
S
(
s
x
1
s
x
2
,
s
y
1
s
y
2
)
.
V
dc
=
V
wc
T
(
−
cx
wc
,−
cy
wc
)
S
(
T
(
,
)
.
(10.13)
Comparing Equations (10.12) and (10.13), we see that
W
dc
W
wc
,
H
dc
H
wc
)
W
dc
2
H
dc
2
M
w
2
d
=
T
(
−
cx
wc
,−
cy
wc
)
S
(
T
(
,
)
.
(10.14)
Equation (10.14) says that the operator
M
w
2
d
, which transforms from the WC
(
x
wc
,
y
wc
)
to the DC
(
x
dc
,
y
dc
)
, does the following.
•
Move.
The center of the WC window to the origin with (
T
(
−
cx
wc
,−
cy
wc
)
).
H
wc
rectangle centered at the origin.
•
Scale.
With the WC window width of
W
wc
, the scaling factor
W
dc
The result of this transform is a
W
wc
×
W
wc
changes
the width to
W
dc
. In a similar fashion, the height becomes
H
dc
.Afterthe
scaling operator, we have a
W
dc
×
H
dc
rectangle centered at the origin.
Search WWH ::
Custom Search