|
iText 9.8.0 API
|
Represents a sequence of 2D transformations to be applied during rendering. More...
Classes |
|
| class | SingleTransform |
This class is used to store one transform function. More... |
|
Public Member Functions |
|
| Transform () | |
| Creates a new Transform instance. More... |
|
| Transform (float a, float b, float c, float d, UnitValue e, UnitValue f) | |
| Creates a new Transform instance. More... |
|
| Transform (int length) | |
| Creates a new Transform instance. More... |
|
| virtual void | AddSingleTransform (Transform.SingleTransform singleTransform) |
| Adds a SingleTransform in a list of single transforms to process later. More... |
|
| virtual iText.Layout.Properties.Transform | AddTransform (Transform.SingleTransform singleTransform) |
| Adds a SingleTransform in a list of single transforms to process later. More... |
|
| virtual iText.Layout.Properties.Transform | Translate (float x, float y) |
| Appends a translation transform by the given point-unit offsets. More... |
|
| virtual iText.Layout.Properties.Transform | Translate (UnitValue x, UnitValue y) |
| Appends a translation transform by the given UnitValue offsets. More... |
|
| virtual iText.Layout.Properties.Transform | ScaleX (float scX) |
| Appends a horizontal scaling transform. More... |
|
| virtual iText.Layout.Properties.Transform | ScaleY (float scY) |
| Appends a vertical scaling transform. More... |
|
| virtual iText.Layout.Properties.Transform | SkewX (float skewAngleX) |
| Appends a horizontal skewing (shearing) transform. More... |
|
| virtual iText.Layout.Properties.Transform | SkewY (float skewAngleY) |
| Appends a vertical skewing (shearing) transform. More... |
|
| virtual iText.Layout.Properties.Transform | SimulateRotateX (float angle) |
| Appends an orthographic 2D approximation of a 3D rotation around the X axis. More... |
|
| virtual iText.Layout.Properties.Transform | SimulateRotateY (float angle) |
| Appends an orthographic 2D approximation of a 3D rotation around the Y axis. More... |
|
| virtual iText.Layout.Properties.Transform | Rotate (float angle) |
| Appends a counter-clockwise rotation transform. More... |
|
| virtual iText.Layout.Properties.Transform | Rotate (float angle, float cx, float cy) |
Appends a counter-clockwise rotation transform around a point offset from the element's center by (cx, cy). More... |
|
| virtual iText.Layout.Properties.Transform | Rotate (float angle, UnitValue cx, UnitValue cy) |
| Appends a counter-clockwise rotation transform around a pivot point specified as UnitValue offsets from the element's center. More... |
|
Static Public Member Functions |
|
| static AffineTransform | GetAffineTransform (iText.Layout.Properties.Transform t, float width, float height) |
| Converts the Transform instance, i.e. the list of SingleTransform instances, to the equivalent iText.Kernel.Geom.AffineTransform instance relatively to the available area, including resolving of percent values to point values. More... |
|
Represents a sequence of 2D transformations to be applied during rendering.
Represents a sequence of 2D transformations to be applied during rendering.
This class can be used to compose translations, scaling, skewing, rotations, and lightweight 2D approximations of 3D rotations. It is used both for CSS-derived transforms and for programmatically defined layout transformations.
|
inline |
Creates a new Transform instance.
|
inline |
Creates a new Transform instance.
Creates a new Transform instance.
Detailed explanation of [a b c d e f] parameters of transformation matrix can be found in iText.Kernel.Geom.Matrix documentation.
| a | horizontal scaling |
| b | vertical skewing |
| c | horizontal skewing |
| d | vertical scaling |
| e | horizontal translation |
| f | vertical translation |
|
inline |
Creates a new Transform instance.
| length | the amount of SingleTransform instances that this Transform instant shall contain and be able to process |
|
inlinevirtual |
Adds a SingleTransform in a list of single transforms to process later.
| singleTransform | a SingleTransform instance |
|
inlinevirtual |
Adds a SingleTransform in a list of single transforms to process later.
| singleTransform | a SingleTransform instance |
|
inlinestatic |
Converts the Transform instance, i.e. the list of SingleTransform instances, to the equivalent iText.Kernel.Geom.AffineTransform instance relatively to the available area, including resolving of percent values to point values.
| t | a Transform instance to convert |
| width | the width of available area, the point value of which is equivalent to 100% for percentage resolving |
| height | the height of available area, the point value of which is equivalent to 100% for percentage resolving |
|
inlinevirtual |
Appends a counter-clockwise rotation transform.
Appends a counter-clockwise rotation transform.
The rotation maps to the affine matrix [cos θ, sin θ, -sin θ, cos θ, 0, 0] , where θ is the supplied angle in radians. A positive angle rotates counter-clockwise in the PDF coordinate system (Y-axis pointing upward).
Note: the renderer applies every Transform centered on the element's occupied area, so this effectively rotates around the center of the element, not around the element origin (0, 0).
To rotate around a point offset from the element's center use Rotate(float, float, float).
| angle | the counter-clockwise rotation angle, in radians |
|
inlinevirtual |
Appends a counter-clockwise rotation transform around a point offset from the element's center by (cx, cy).
Appends a counter-clockwise rotation transform around a point offset from the element's center by (cx, cy).
Because the renderer already centers the coordinate system on the element's occupied area before applying the transform, (cx, cy) are interpreted as offsets from that center. Passing (0, 0) is equivalent to calling Rotate(float).
A positive angle rotates counter-clockwise in the PDF coordinate system (Y-axis pointing upward).
| angle | the counter-clockwise rotation angle, in radians |
| cx | horizontal offset from the element's center to the pivot point, in points |
| cy | vertical offset from the element's center to the pivot point, in points |
|
inlinevirtual |
Appends a counter-clockwise rotation transform around a pivot point specified as UnitValue offsets from the element's center.
Appends a counter-clockwise rotation transform around a pivot point specified as UnitValue offsets from the element's center.
Both point and percentage UnitValue s are supported. Percentages for cx are resolved relative to the element's width and percentages for cy relative to its height at render time, consistent with how Translate(UnitValue, UnitValue) works.
Passing UnitValue.createPointValue(0) for both cx and cy is equivalent to calling Rotate(float). A positive angle rotates counter-clockwise in the PDF coordinate system (Y-axis pointing upward).
| angle | the counter-clockwise rotation angle, in radians |
| cx | horizontal offset from the element's center to the pivot point |
| cy | vertical offset from the element's center to the pivot point |
|
inlinevirtual |
Appends a horizontal scaling transform.
Appends a horizontal scaling transform.
The element is stretched or compressed along the X axis by the given factor. A value of 1 leaves the width unchanged, values greater than 1 widen the element, and values between 0 and 1 narrow it.
Passing 0 collapses the element to zero width, making it invisible. Passing a negative value flips the element horizontally and scales it by the absolute value of the factor.
| scX | the horizontal scale factor |
|
inlinevirtual |
Appends a vertical scaling transform.
Appends a vertical scaling transform.
The element is stretched or compressed along the Y axis by the given factor. A value of 1 leaves the height unchanged, values greater than 1 increase the height, and values between 0 and 1 reduce it.
Passing 0 collapses the element to zero height, making it invisible. Passing a negative value flips the element vertically and scales it by the absolute value of the factor.
| scY | the vertical scale factor |
|
inlinevirtual |
Appends an orthographic 2D approximation of a 3D rotation around the X axis.
Appends an orthographic 2D approximation of a 3D rotation around the X axis.
This simulation applies vertical foreshortening only, equivalent to scaling the Y axis by cos(angle) . Perspective distortion is not applied.
| angle | the rotation angle around the X axis, in radians |
|
inlinevirtual |
Appends an orthographic 2D approximation of a 3D rotation around the Y axis.
Appends an orthographic 2D approximation of a 3D rotation around the Y axis.
This simulation applies horizontal foreshortening only, equivalent to scaling the X axis by cos(angle) . Perspective distortion is not applied.
| angle | the rotation angle around the Y axis, in radians |
|
inlinevirtual |
Appends a horizontal skewing (shearing) transform.
Appends a horizontal skewing (shearing) transform.
Vertical lines are tilted by the angle given in radians, shifting X coordinates proportionally to their Y position. Equivalent to the CSS skewX() function.
| skewAngleX | the skew angle, in radians |
|
inlinevirtual |
Appends a vertical skewing (shearing) transform.
Appends a vertical skewing (shearing) transform.
Horizontal lines are tilted by the angle given in radians, shifting Y coordinates proportionally to their X position. Equivalent to the CSS skewY() function.
| skewAngleY | the skew angle, in radians |
|
inlinevirtual |
Appends a translation transform by the given point-unit offsets.
| x | the horizontal translation in points |
| y | the vertical translation in points |
|
inlinevirtual |
Appends a translation transform by the given UnitValue offsets.
Appends a translation transform by the given UnitValue offsets.
Both point and percentage values are supported; percentages are resolved relative to the width (for x ) and the height (for y ) of the available area at render time.