ImageGear for .NET
ImGearPDFFixedMatrix Class
Members  See Also  Send Feedback
ImageGear21.Formats.Pdf Assembly > ImageGear.Formats.PDF Namespace : ImGearPDFFixedMatrix Class




Glossary Item Box

Describes a matrix containing fixed numbers.

Object Model

ImGearPDFFixedMatrix Class

Syntax

 
Visual Basic
C#
Managed Extensions for C++
C++/CLI
 
 

Remarks

This class defines a transformation matrix for the content object, which usually corresponds to the Matrix key in the dictionary. A transformation matrix specifies the relationship between two coordinate systems. By modifying a transformation matrix, objects can be scaled, rotated, translated, or transformed in other ways. The transformation between two coordinate systems is represented by a 3-by-3 transformation matrix written as follows:

A B 0

C D 0

H V 1

A transformation matrix has only six elements that can be changed as the six-element array [ a b c d h v ]. It can represent any linear transformation from one coordinate system to another. The transformation matrix multiplication can be presented as follows:

x1 = x*A + y*C + H

y1 = x*B + y* D + V

The following lists the arrays that specify the most common transformations:

  • Translations are specified as [ 1 0 0 1 tx ty ], where tx and ty are the distances to translate the origin of the coordinate system in the horizontal and vertical dimensions, respectively.
  • Scaling is obtained by [ sx 0 0 sy 0 0 ]. This scales the coordinates so that 1 unit in the horizontal and vertical dimensions of the new coordinate system is the same size as sx and sy units, respectively, in the previous coordinate system.
  • Rotations are produced by [ cos Ang sin Ang -sin Ang cos Ang 0 0 ], which has the effect of rotating the coordinate system axes by an angle Ang counterclockwise.
  • Skew is specified by [ 1 tan a tan b 1 0 0 ], which skews the x axis by an angle a and the y axis by an angle b.

If several transformations are combined, the order in which they are applied is significant. For example, first scaling and then translating the x axis is not the same as first translating and then scaling it.

In general, to obtain the expected results, transformations should be done in the following order:

Translate

RotateScale or skew

See section "4.2 Coordinate Systems" of the PDF Reference for more details.

Inheritance Hierarchy

System.Object
   ImageGear.Formats.PDF.ImGearPDFFixedMatrix

See Also

©2013. Accusoft Corporation. All Rights Reserved.