Normalize CFF CID sub matrices to work on windows.

This commit is contained in:
Brendan Dahl 2013-04-15 16:14:07 -07:00
parent 985307907b
commit 3cba5a0c8a
4 changed files with 47 additions and 1 deletions

View file

@ -223,6 +223,18 @@ var Util = PDFJS.Util = (function UtilClosure() {
return Util.makeCssCmyk(cmyk);
};
// Concatenates two transformation matrices together and returns the result.
Util.transform = function Util_transform(m1, m2) {
return [
m1[0] * m2[0] + m1[2] * m2[1],
m1[1] * m2[0] + m1[3] * m2[1],
m1[0] * m2[2] + m1[2] * m2[3],
m1[1] * m2[2] + m1[3] * m2[3],
m1[0] * m2[4] + m1[2] * m2[5] + m1[4],
m1[1] * m2[4] + m1[3] * m2[5] + m1[5]
];
};
// For 2d affine transforms
Util.applyTransform = function Util_applyTransform(p, m) {
var xt = p[0] * m[0] + p[1] * m[2] + m[4];