[]
DsPdfJS API / Transform
Represents a 3x2 transformation matrix.
get id():
number
Gets the reference to the object.
number
get matrix():
number[]
Gets or sets the transformation matrix. The matrix consists of six numbers (their meaning is simplified for clarity): m11 - scales the drawing horizontally m12 - skew the the drawing horizontally m21 - skew the the drawing vertically m22 - scales the drawing vertically m31 - moves the the drawing horizontally m32 - moves the the drawing vertically
number[]
set matrix(
matrix):void
Gets or sets the transformation matrix. The matrix consists of six numbers (their meaning is simplified for clarity): m11 - scales the drawing horizontally m12 - skew the the drawing horizontally m21 - skew the the drawing vertically m22 - scales the drawing vertically m31 - moves the the drawing horizontally m32 - moves the the drawing vertically
number[]
void
get om():
ObjectManager
Gets the owner ObjectManager instance.
staticcreateIdentity():Transform
Creates an identity transformation.
Transform
A new instance of Transform.
staticcreateIdentity(om):Transform
Creates an identity transformation.
An object manager that controls the lifetime of the Transform object.
Transform
A new instance of Transform.
staticcreateMatrix(m11,m12,m21,m22,m31,m32):Transform
Creates a transformation based on the specified 3x2 matrix.
number
Scales the drawing horizontally
number
Skew the the drawing horizontally
number
Skew the the drawing vertically
number
Scales the drawing vertically
number
Moves the the drawing horizontally
number
Moves the the drawing vertically
Transform
A new instance of Transform.
staticcreateMatrix(om,m11,m12,m21,m22,m31,m32):Transform
Creates a transformation based on the specified 3x2 matrix.
An object manager that controls the lifetime of the Transform object.
number
Scales the drawing horizontally
number
Skew the the drawing horizontally
number
Skew the the drawing vertically
number
Scales the drawing vertically
number
Moves the the drawing horizontally
number
Moves the the drawing vertically
Transform
A new instance of Transform.
staticcreateRotation(angle,angleUnits?,cx?,cy?):Transform
Creates a rotation transformation.
number
The rotation angle.
The angle units. The default is Degrees.
number
The optional center point X offset.
number
The optional center point Y offset.
Transform
A new instance of Transform.
staticcreateRotation(om,angle,angleUnits?,cx?,cy?):Transform
Creates a rotation transformation.
An object manager that controls the lifetime of the Transform object.
number
The rotation angle.
The angle units. The default is Degrees.
number
The optional center point X offset.
number
The optional center point Y offset.
Transform
A new instance of Transform.
staticcreateScale(scaleFactor,cx?,cy?):Transform
Creates a scaling transformation.
number
The value to scale by on the X and Y axes.
number
The optional center point X offset.
number
The optional center point Y offset.
Transform
A new instance of Transform.
staticcreateScale(om,scaleFactor,cx?,cy?):Transform
Creates a scaling transformation.
An object manager that controls the lifetime of the Transform object.
number
The value to scale by on the X and Y axes.
number
The optional center point X offset.
number
The optional center point Y offset.
Transform
A new instance of Transform.
staticcreateScaleXY(scaleX,scaleY,cx?,cy?):Transform
Creates a scaling transformation.
number
The value to scale by on the X axis.
number
The value to scale by on the Y axis.
number
The optional center point X offset.
number
The optional center point Y offset.
Transform
A new instance of Transform.
staticcreateScaleXY(om,scaleX,scaleY,cx?,cy?):Transform
Creates a scaling transformation.
An object manager that controls the lifetime of the Transform object.
number
The value to scale by on the X axis.
number
The value to scale by on the Y axis.
number
The optional center point X offset.
number
The optional center point Y offset.
Transform
A new instance of Transform.
staticcreateSkew(angleX,angleY,angleUnits?,cx?,cy?):Transform
Creates a skew transformation.
number
The X angle.
number
The Y angle.
The angle units. The default is Degrees.
number
The optional center point X offset.
number
The optional center point Y offset.
Transform
A new instance of Transform.
staticcreateSkew(om,angleX,angleY,angleUnits?,cx?,cy?):Transform
Creates a skew transformation.
An object manager that controls the lifetime of the Transform object.
number
The X angle.
number
The Y angle.
The angle units. The default is Degrees.
number
The optional center point X offset.
number
The optional center point Y offset.
Transform
A new instance of Transform.
staticcreateTranslation(offsetX,offsetY):Transform
Creates a translation transformation.
number
The horizontal offset.
number
The vertical offset.
Transform
A new instance of Transform.
staticcreateTranslation(om,offsetX,offsetY):Transform
Creates a translation transformation.
An object manager that controls the lifetime of the Transform object.
number
The horizontal offset.
number
The vertical offset.
Transform
A new instance of Transform.
applyTransform(
transform):void
Applies the transformation to the current instance.
Transform
The Transform object to be multiplied by the current transformation matrix.
void
clone():
Transform
Creates a copy of the current transformation.
Transform
A copy of the current Transform object.
free():
void
Detaches the object from the ObjectManager and deallocates its memory, if possible.
void
pop():
void
Restores the previously pushed transformation from the stack.
void
push():
void
Saves the current transformation to the stack.
void
rebind(
omTo):void
Rebinds the object from the current ObjectManager to the specified one.
The new ObjectManager for the object.
void
reset():
void
Resets the transformation to the identity matrix.
void
rotate(
angle,angleUnits?,cx?,cy?):void
Applies the rotation transformation.
number
The rotation angle.
The angle units. The default is Degrees.
number
The optional center point X offset.
number
The optional center point Y offset.
void
scale(
scaleFactor,cx?,cy?):void
Applies the scaling transformation.
number
The value to scale by on the X and Y axes.
number
The optional center point X offset.
number
The optional center point Y offset.
void
scaleXY(
scaleX,scaleY,cx?,cy?):void
Applies the scaling transformation.
number
The value to scale by on the X axis.
number
The value to scale by on the Y axis.
number
The optional center point X offset.
number
The optional center point Y offset.
void
setTransform(
transform):void
Sets the transformation to the current instance.
Transform
The Transform object to replace the current transformation.
void
skew(
angleX,angleY,angleUnits?,cx?,cy?):void
Applies the skew transformation.
number
The X angle.
number
The Y angle.
The angle units. The default is Degrees.
number
The optional center point X offset.
number
The optional center point Y offset.
void
skewX(
angle,angleUnits?):void
Applies the skew transformation along the X axis.
number
The X angle.
The angle units. The default is Degrees.
void
skewY(
angle,angleUnits?):void
Applies the skew transformation along the Y axis.
number
The Y angle.
The angle units. The default is Degrees.
void
transformPoint(
point):Point
Transforms a Point by the transformation matrix.
The original Point.
The transformed Point.
transformPoints(
points):Point[]
Transforms an array of Points by the transformation matrix.
Point[]
The original array of Points.
Point[]
The array of transformed Points.
transformQuadrilateral(
quad):Quadrilateral
Transforms a ds.Quadrilateral by the transformation matrix.
The original ds.Quadrilateral.
The transformed ds.Quadrilateral.
translate(
offsetX,offsetY):void
Applies the translation transformation.
number
The horizontal offset.
number
The vertical offset.
void
tryInvert():
boolean
Inverts the transformation matrix, if possible.
boolean
true on success, false otherwise.