pdftron.Common Namespace |
Class | Description | |
---|---|---|
ByteArrayRef |
A byte array that can be passed as a reference.
| |
DoubleArrayRef |
A double array that can be passed as a reference.
| |
DoubleRef |
A double that can be passed as a reference.
| |
Int32Ref |
An Int32 that can be passed as a reference.
| |
IntArrayRef |
A int array that can be passed as a reference.
| |
Matrix2D |
2D Matrix
A Matrix2D object represents a 3x3 matrix that, in turn, represents an affine transformation.
A Matrix2D object stores only six of the nine numbers in a 3x3 matrix because all 3x3
matrices that represent affine transformations have the same third column (0, 0, 1).
Affine transformations include rotating, scaling, reflecting, shearing, and translating.
In PDFNet, the Matrix2D class provides the foundation for performing affine transformations
on vector drawings, images, and text.
A transformation matrix specifies the relationship between two coordinate spaces.
By modifying a transformation matrix, objects can be scaled, rotated, translated,
or transformed in other ways.
A transformation matrix in PDF is specified by six numbers, usually in the form
of an array containing six elements. In its most general form, this array is denoted
[a b c d h v]; The following table lists the arrays that specify the most common
transformations:
Examples
The following sample illustrates how to use Matrix2D in order to position
an image on the page. Note that PDFNet uses the same convention of matrix
multiplication used in PostScript and OpenGL.
Element element = eb.CreateImage(Image(...)); Double deg2rad = 3.1415926535 / 180.0; Matrix2D mtx = Matrix2D(1, 0, 0, 1, 0, 200); // Translate mtx.multiply(Matrix2D(300, 0, 0, 200, 0, 0)); // Scale mtx.multiply(Matrix2D.RotationMatrix(90 * deg2rad)); // Rotate element.GetGState().SetTransform(mtx); writer.WritePlacedElement(element); ... Matrix2D text_mtx = text_element.GetTextMatrix(); Double x, y; for (CharIterator itr = text_element.getCharIterator(); itr.HasNext(); itr.Next()) { x = itr.current().x; // character positioning information y = itr.current().y; Matrix2D ctm = text_element.getCTM(); Matrix2D mtx = ctm.multiply(text_mtx); mtx.multPoint(x, y); | |
PDFNetException |
A utility class that helps in getting more detailed exception and error messages when working with PDFNetWinRT.
| |
RecentlyUsedCache | ProgressMonitor is an interface that an application can use to indicate the
progress of a lengthy operation (such as PDFDoc.Save()).
ProgressMonitor has a range and a current position. The range represents the
entire duration of the operation, and the current position represents the
progress the application has made toward completing the operation.
| |
StringRef |
A string that can be passed as a reference.
|