Foxit PDF SDK  9.1
FSMatrix2D Class Reference
Inheritance diagram for FSMatrix2D:

Instance Methods

(void) - concat:
 Concatenate with another matrix.
More...
 
(void) - concat:b:c:d:e:f:
 Concatenate with another matrix.
More...
 
(void) - concat:b:c:d:e:f:bPrepended:
 Concatenate with another matrix.
More...
 
(void) - concat:bPrepended:
 
(void) - concatInverse:
 Concatenate the inverse of another matrix.
More...
 
(void) - concatInverse:bPrepended:
 Concatenate the inverse of another matrix.
More...
 
(void) - copy:
 Copy coefficients from another matrix.
More...
 
(void) - dealloc
 
(void *) - getCptr
 
(float) - getUnitArea
 Get area of the parallelogram composing two unit vectors.
More...
 
(FSRectF *) - getUnitRect
 Get a bounding rectangle of the parallelogram composing two unit vectors.
More...
 
(float) - getXUnit
 Get the x-direction unit size.
More...
 
(float) - getYUnit
 Get the y-direction unit size.
More...
 
(id) - init
 Construct a identity transformation matrix.
More...
 
(id) - initWithA1:b1:c1:d1:e1:f1:
 Construct a matrix with six input coefficients.
More...
 
(id) - initWithCptr:swigOwnCObject:
 
(BOOL) - is90Rotated
 Whether this matrix has rotating of 90, or -90 degrees.
More...
 
(BOOL) - isIdentity
 Determine whether a matrix is an identity transformation or not.
More...
 
(BOOL) - isInvertible
 Determine whether a matrix is invertible or not.
More...
 
(BOOL) - isScaled
 Whether this matrix has scaling (or translating) only. No rotating.
More...
 
(void) - matchRect:src:
 Get a matrix that transforms a source rectangle to dest rectangle.
More...
 
(void) - reset
 Reset current matrix.
More...
 
(void) - rotate:
 Rotate the matrix.
More...
 
(void) - rotate:bPrepended:
 Rotate the matrix.
More...
 
(void) - rotateAt:x:y:
 Rotate the matrix at a position.
More...
 
(void) - rotateAt:x:y:bPrepended:
 Rotate the matrix at a position.
More...
 
(void) - scale:sy:
 Scale the matrix.
More...
 
(void) - scale:sy:bPrepended:
 Scale the matrix.
More...
 
(void) - set:
 
(void) - set:b:c:d:e:f:
 Change the coefficients in the matrix.
More...
 
(void) - setIdentity
 Set the matrix to be an identity transformation matrix.
More...
 
(void) - setReverse:
 Set the coefficients of the inverse of another matrix to this matrix.
More...
 
(void) - shear:fBetaRadian:
 Shear the matrix.
More...
 
(void) - shear:fBetaRadian:bPrepended:
 Shear the matrix.
More...
 
(float) - transformDistance:
 
(float) - transformDistance:dy:
 Transform distance specified by x and y value.
More...
 
(void) - transformPoint:y:
 Transform point specified by x and y value.
More...
 
(void) - transformRect:
 Transform a rectangle and return a bounding rectangle. The result rectangle is always normalized: left <= right, and bottom <= top.
More...
 
(float) - transformXDistance:
 Transform a x-distance.
More...
 
(float) - transformYDistance:
 Transform a y-distance.
More...
 
(void) - translate:y:
 Translate the matrix.
More...
 
(void) - translate:y:bPrepended:
 Translate the matrix.
More...
 
(void) - translateI:y:
 Translate the matrix. using integer value.
More...
 
(void) - translateI:y:bPrepended:
 Translate the matrix. using integer value.
More...
 

Protected Attributes

BOOL swigCMemOwn
 
void * swigCPtr
 

Properties

float a
 The coefficient a.
More...
 
float b
 The coefficient b.
More...
 
float c
 The coefficient c.
More...
 
float d
 The coefficient d.
More...
 
float e
 The coefficient e.
More...
 
float f
 The coefficient f.
More...
 

Detailed Description

Affine (linear) transformation matrix.

It defines six coefficients: a, b, c, d, e, f. The transformation equations are: dest_x = a * src_x + c * src_y + e; dest_y = b * src_x + d * src_y + f;

Method Documentation

◆ concat:

- (void) concat: (FSMatrix2D*)  m

Concatenate with another matrix.

Parameters
[in]mThe input matrix.
Returns
None.

◆ concat:b:c:d:e:f:

- (void) concat: (float)  a
b: (float)  b
c: (float)  c
d: (float)  d
e: (float)  e
f: (float)  f 

Concatenate with another matrix.

Parameters
[in]aThe coefficient a of the input matrix.
[in]bThe coefficient b of the input matrix.
[in]cThe coefficient c of the input matrix.
[in]dThe coefficient d of the input matrix.
[in]eThe coefficient e of the input matrix.
[in]fThe coefficient f of the input matrix.
Returns
None.

◆ concat:b:c:d:e:f:bPrepended:

- (void) concat: (float)  a
b: (float)  b
c: (float)  c
d: (float)  d
e: (float)  e
f: (float)  f
bPrepended: (BOOL)  bPrepended 

Concatenate with another matrix.

Parameters
[in]aThe coefficient a of the input matrix.
[in]bThe coefficient b of the input matrix.
[in]cThe coefficient c of the input matrix.
[in]dThe coefficient d of the input matrix.
[in]eThe coefficient e of the input matrix.
[in]fThe coefficient f of the input matrix.
[in]bPrependedIf this is YES, the concatenation matrix is multiplied at left side, or at right side.

Returns
None.

◆ concat:bPrepended:

- (void) concat: (FSMatrix2D *)  m
bPrepended: (BOOL)  bPrepended 

◆ concatInverse:

- (void) concatInverse: (FSMatrix2D*)  m

Concatenate the inverse of another matrix.

Parameters
[in]mThe input matrix.
Returns
None.

◆ concatInverse:bPrepended:

- (void) concatInverse: (FSMatrix2D*)  m
bPrepended: (BOOL)  bPrepended 

Concatenate the inverse of another matrix.

Parameters
[in]mThe input matrix.
[in]bPrependedIf this is YES, the concatenation matrix is multiplied at left side, or at right side.
Returns
None.

◆ copy:

- (void) copy: (FSMatrix2D*)  m

Copy coefficients from another matrix.

Parameters
[in]mThe input matrix.
Returns
None.

◆ dealloc

- (void) dealloc

◆ getCptr

- (void*) getCptr

◆ getUnitArea

- (float) getUnitArea

Get area of the parallelogram composing two unit vectors.

Returns
The area of the parallelogram composing two unit vectors.

◆ getUnitRect

- (FSRectF *) getUnitRect

Get a bounding rectangle of the parallelogram composing two unit vectors.

Returns
The unit rect.

◆ getXUnit

- (float) getXUnit

Get the x-direction unit size.

Returns
The x-direction unit size.

◆ getYUnit

- (float) getYUnit

Get the y-direction unit size.

Returns
The y-direction unit size.

◆ init

- (id) init

Construct a identity transformation matrix.

◆ initWithA1:b1:c1:d1:e1:f1:

- (id) initWithA1: (float)  a1
b1: (float)  b1
c1: (float)  c1
d1: (float)  d1
e1: (float)  e1
f1: (float)  f1 

Construct a matrix with six input coefficients.

Parameters
[in]a1The input coefficient a.
[in]b1The input coefficient b.
[in]c1The input coefficient c.
[in]d1The input coefficient d.
[in]e1The input coefficient e.
[in]f1The input coefficient f.

◆ initWithCptr:swigOwnCObject:

- (id) initWithCptr: (void *)  cptr
swigOwnCObject: (BOOL)  ownCObject 

◆ is90Rotated

- (BOOL) is90Rotated

Whether this matrix has rotating of 90, or -90 degrees.

Returns
YES means current matrix has rotating of 90, or -90 degrees, while NO means not.

◆ isIdentity

- (BOOL) isIdentity

Determine whether a matrix is an identity transformation or not.

Returns
YES means current matrix is identity, while NO means not.

◆ isInvertible

- (BOOL) isInvertible

Determine whether a matrix is invertible or not.

Returns
YES means current matrix is invertible, while NO means not.

◆ isScaled

- (BOOL) isScaled

Whether this matrix has scaling (or translating) only. No rotating.

Returns
YES means current matrix has scaling (or translating) only, while NO means not.

◆ matchRect:src:

- (void) matchRect: (FSRectF*)  dest
src: (FSRectF*)  src 

Get a matrix that transforms a source rectangle to dest rectangle.

Parameters
[in]destThe dest rectangle.
[in]srcThe source rectangle.
Returns
None.

◆ reset

- (void) reset

Reset current matrix.

Returns
None.

◆ rotate:

- (void) rotate: (float)  fRadian

Rotate the matrix.

Parameters
[in]fRadianRotation angle in radian.
Returns
None.

◆ rotate:bPrepended:

- (void) rotate: (float)  fRadian
bPrepended: (BOOL)  bPrepended 

Rotate the matrix.

Parameters
[in]fRadianRotation angle in radian.
[in]bPrependedIf it's true, a rotation matrix is multiplied at left side, or at right side.
Returns
None.

◆ rotateAt:x:y:

- (void) rotateAt: (float)  fRadian
x: (float)  x
y: (float)  y 

Rotate the matrix at a position.

Parameters
[in]fRadianRotation angle in radian.
[in]xThe x coordinate from which to rotate.
[in]yThe y coordinate from which to rotate.
Returns
None.

◆ rotateAt:x:y:bPrepended:

- (void) rotateAt: (float)  fRadian
x: (float)  x
y: (float)  y
bPrepended: (BOOL)  bPrepended 

Rotate the matrix at a position.

Parameters
[in]fRadianRotation angle in radian.
[in]xThe x coordinate from which to rotate.
[in]yThe y coordinate from which to rotate.
[in]bPrependedIf this is YES, a rotation matrix is multiplied at left side, or at right side.
Returns
None.

◆ scale:sy:

- (void) scale: (float)  sx
sy: (float)  sy 

Scale the matrix.

Parameters
[in]sxThe x-direction scale coefficient.
[in]syThe y-direction scale coefficient.
Returns
None.

◆ scale:sy:bPrepended:

- (void) scale: (float)  sx
sy: (float)  sy
bPrepended: (BOOL)  bPrepended 

Scale the matrix.

Parameters
[in]sxThe x-direction scale coefficient.
[in]syThe y-direction scale coefficient.
[in]bPrependedIf this is YES, a scaling matrix is multiplied at left side, or at right side.
Returns
None.

◆ set:

- (void) set: (NSArray< NSNumber * > *)  n

◆ set:b:c:d:e:f:

- (void) set: (float)  a
b: (float)  b
c: (float)  c
d: (float)  d
e: (float)  e
f: (float)  f 

Change the coefficients in the matrix.

Parameters
[in]aThe input coefficient a.
[in]bThe input coefficient b.
[in]cThe input coefficient c.
[in]dThe input coefficient d.
[in]eThe input coefficient e.
[in]fThe input coefficient f.
Returns
None.

◆ setIdentity

- (void) setIdentity

Set the matrix to be an identity transformation matrix.

Returns
None.

◆ setReverse:

- (void) setReverse: (FSMatrix2D*)  m

Set the coefficients of the inverse of another matrix to this matrix.

Parameters
[in]mThe input matrix.
Returns
None.

◆ shear:fBetaRadian:

- (void) shear: (float)  fAlphaRadian
fBetaRadian: (float)  fBetaRadian 

Shear the matrix.

Parameters
[in]fAlphaRadianShearing angle of x axis.
[in]fBetaRadianShearing angle of y axis.
Returns
None.

◆ shear:fBetaRadian:bPrepended:

- (void) shear: (float)  fAlphaRadian
fBetaRadian: (float)  fBetaRadian
bPrepended: (BOOL)  bPrepended 

Shear the matrix.

Parameters
[in]fAlphaRadianShearing angle of x axis.
[in]fBetaRadianShearing angle of y axis.
[in]bPrependedIf this is YES, a shearing matrix is multiplied at left side, or at right side.
Returns
None.

◆ transformDistance:

- (float) transformDistance: (float)  distance

◆ transformDistance:dy:

- (float) transformDistance: (float)  dx
dy: (float)  dy 

Transform distance specified by x and y value.

Parameters
[in]dxThe input x value.
[in]dyThe input y value.
Returns
The transformed distance.

◆ transformPoint:y:

- (void) transformPoint: (float *)  x
y: (float *)  y 

Transform point specified by x and y value.

Parameters
[in,out]xThe input x-coordinate of the point, and it receives the output transformed x-coordinate.
[in,out]yThe input y-coordinate of the point, and it receives the output transformed y-coordinate.
Returns
None.

◆ transformRect:

- (void) transformRect: (FSRectF*)  rect

Transform a rectangle and return a bounding rectangle. The result rectangle is always normalized: left <= right, and bottom <= top.

Parameters
[in,out]rectThe input rectangle, and it receives the output transformed and normalized rectangle.
Returns
None.

◆ transformXDistance:

- (float) transformXDistance: (float)  dx

Transform a x-distance.

Parameters
[in]dxThe input x-distance.
Returns
The transformed distance.

◆ transformYDistance:

- (float) transformYDistance: (float)  dy

Transform a y-distance.

Parameters
[in]dyThe input y-distance.
Returns
The transformed distance.

◆ translate:y:

- (void) translate: (float)  x
y: (float)  y 

Translate the matrix.

Parameters
[in]xThe x-direction delta value.
[in]yThe y-direction delta value.
Returns
None.

◆ translate:y:bPrepended:

- (void) translate: (float)  x
y: (float)  y
bPrepended: (BOOL)  bPrepended 

Translate the matrix.

Parameters
[in]xThe x-direction delta value.
[in]yThe y-direction delta value.
[in]bPrependedIf this is YES, a translation matrix is multiplied at left side, or at right side.
Returns
None.

◆ translateI:y:

- (void) translateI: (int)  x
y: (int)  y 

Translate the matrix. using integer value.

Parameters
[in]xThe x-direction delta integer value.
[in]yThe y-direction delta integer value.
Returns
None.

◆ translateI:y:bPrepended:

- (void) translateI: (int)  x
y: (int)  y
bPrepended: (BOOL)  bPrepended 

Translate the matrix. using integer value.

Parameters
[in]xThe x-direction delta integer value.
[in]yThe y-direction delta integer value.
[in]bPrependedIf this is YES, a translation matrix is multiplied at left side, or at right side.
Returns
None.

Member Data Documentation

◆ swigCMemOwn

- (BOOL) swigCMemOwn
protected

◆ swigCPtr

- (void*) swigCPtr
protected

Property Documentation

◆ a

- (float) a
readwritenonatomicassign

The coefficient a.

◆ b

- (float) b
readwritenonatomicassign

The coefficient b.

◆ c

- (float) c
readwritenonatomicassign

The coefficient c.

◆ d

- (float) d
readwritenonatomicassign

The coefficient d.

◆ e

- (float) e
readwritenonatomicassign

The coefficient e.

◆ f

- (float) f
readwritenonatomicassign

The coefficient f.