1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-18 14:18:23 +02:00

Merge pull request #19781 from Snuffleupagus/mv-IDENTITY_MATRIX

Move the `IDENTITY_MATRIX` constant into `src/core/core_utils.js` (PR 19772 follow-up)
This commit is contained in:
Jonas Jenwald 2025-04-08 17:16:31 +02:00 committed by GitHub
commit 19486952c2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 6 additions and 5 deletions

View file

@ -25,7 +25,6 @@ import {
BASELINE_FACTOR,
FeatureTest,
getModificationDate,
IDENTITY_MATRIX,
info,
isArrayEqual,
LINE_DESCENT_FACTOR,
@ -44,6 +43,7 @@ import {
getInheritableProperty,
getParentToUpdate,
getRotationMatrix,
IDENTITY_MATRIX,
isNumberArray,
lookupMatrix,
lookupNormalRect,

View file

@ -30,6 +30,8 @@ const PDF_VERSION_REGEXP = /^[1-9]\.\d$/;
const MAX_INT_32 = 2 ** 31 - 1;
const MIN_INT_32 = -(2 ** 31);
const IDENTITY_MATRIX = [1, 0, 0, 1, 0, 0];
function getLookupTableFactory(initializer) {
let lookup;
return function () {
@ -722,6 +724,7 @@ export {
getParentToUpdate,
getRotationMatrix,
getSizeInBytes,
IDENTITY_MATRIX,
isAscii,
isBooleanArray,
isNumberArray,

View file

@ -19,7 +19,6 @@ import {
DrawOPS,
FONT_IDENTITY_MATRIX,
FormatError,
IDENTITY_MATRIX,
info,
isArrayEqual,
normalizeUnicode,
@ -36,6 +35,7 @@ import { compileType3Glyph, FontFlags } from "./fonts_utils.js";
import { ErrorFont, Font } from "./fonts.js";
import {
fetchBinaryData,
IDENTITY_MATRIX,
isNumberArray,
lookupMatrix,
lookupNormalRect,

View file

@ -16,7 +16,6 @@
import {
assert,
FormatError,
IDENTITY_MATRIX,
info,
MathClamp,
unreachable,
@ -24,6 +23,7 @@ import {
warn,
} from "../shared/util.js";
import {
IDENTITY_MATRIX,
isBooleanArray,
isNumberArray,
lookupMatrix,

View file

@ -25,7 +25,6 @@ const isNodeJS =
!process.versions.nw &&
!(process.versions.electron && process.type && process.type !== "browser");
const IDENTITY_MATRIX = [1, 0, 0, 1, 0, 0];
const FONT_IDENTITY_MATRIX = [0.001, 0, 0, 0.001, 0, 0];
// Represent the percentage of the height of a single-line field over
@ -1303,7 +1302,6 @@ export {
getUuid,
getVerbosityLevel,
hexNumbers,
IDENTITY_MATRIX,
ImageKind,
info,
InvalidPDFException,