fontjs
Version:
FontJS (Font.js) is a packages for TrueType font parsing and manipulation
95 lines (94 loc) • 2.09 kB
TypeScript
export interface MatrixParameters {
/**
* value for A index
*/
a?: number;
/**
* value for B index
*/
b?: number;
/**
* value for C index
*/
c?: number;
/**
* value for D index
*/
d?: number;
/**
* value for E index
*/
e?: number;
/**
* value for F index
*/
f?: number;
/**
* value for J index (always 0 for 2-D)
*/
j?: number;
/**
* value for K index (always 0 for 2-D)
*/
k?: number;
/**
* value for L index (always 1 for 2-D)
*/
l?: number;
}
export declare class Matrix {
private _array;
/**
* Constructor for the Matrix class.
* @param parameters
*/
constructor(parameters?: MatrixParameters);
/**
* Make a PDF Matrix instance having only "translation indexes"
* @param tx Translation index for X
* @param ty Translation index for Y
*/
static makeTranslation(tx: number, ty: number): Matrix;
/**
* Set internal values of the class.
* @param parameters
*/
setValues(parameters?: MatrixParameters): void;
/**
* Provides multiplication with input Matrix
* @param other The matrix with need to multiply with
*/
multiply(other: Matrix): Matrix;
/**
* Add one matrix to another.
* @param other The matrix with need to add to
*/
add(other: Matrix): Matrix;
/**
* Substruct one matrix from another.
* @param other The matrix we need to substruct
*/
sub(other: Matrix): Matrix;
/**
* @return Determinate for the matrix
*/
get det(): number;
get a(): number;
set a(value: number);
get b(): number;
set b(value: number);
get c(): number;
set c(value: number);
get d(): number;
set d(value: number);
get e(): number;
set e(value: number);
get f(): number;
set f(value: number);
get j(): number;
set j(value: number);
get k(): number;
set k(value: number);
get l(): number;
set l(value: number);
}