SECTION 4.2
209
Coordinate Systems
space to device space. Recalling that coordinates are always specified in the trans-
formed space, the correct order of transformations must first convert the scaled
coordinates to default user space and then the default user space coordinates to
device space. This can be expressed as
X
D
=
X
U
×
M
C
=
(
X
S
×
M
S
) ×
M
C
=
X
S
× (
M
S
×
M
C
)
where
X
D
denotes the coordinates in device space
X
U
denotes the coordinates in default user space
X
S
denotes the coordinates in scaled user space
This shows that when a new transformation is concatenated with an existing one,
the matrix representing it must be multiplied
before
(premultiplied with) the
existing transformation matrix.
This result is true in general for PDF: when a sequence of transformations is car-
ried out, the matrix representing the combined transformation
(M
′)
is calculated
by premultiplying the matrix representing the additional transformation
(M
T
)
with the one representing all previously existing transformations
(M):
M′
=
M
T
×
M
Note:
When rendering graphics objects, it is sometimes necessary for an application
to perform the inverse of a transformation—that is, to find the user space coordi-
nates that correspond to a given pair of device space coordinates. Not all transfor-
mations are invertible, however. For example, if a matrix contains
a, b, c,
and
d
elements that are all zero, all user coordinates map to the same device coordinates
and there is no unique inverse transformation. Such noninvertible transformations
are not very useful and generally arise from unintended operations, such as scaling
by 0. Use of a noninvertible matrix when painting graphics objects can result in un-
predictable behavior.
Index Bookmark Pages Text
Previous Next
Pages: Index All Pages
This HTML file was created by VeryPDF PDF to HTML Converter product.