MCPcopy Create free account
hub / github.com/feiyu563/PrometheusAlert / docUsePattern

Function docUsePattern

static/plugins/pdfmake/pdfmake.js:22973–23004  ·  view source on GitHub ↗
(pattern, stroke)

Source from the content-addressed store, hash-verified

22971 }
22972
22973 function docUsePattern(pattern, stroke) {
22974 var name = 'P' + (doc._patternCount = (doc._patternCount || 0) + 1);
22975 var ref = doc.ref({
22976 Type: 'Pattern',
22977 PatternType: 1,
22978 PaintType: 1,
22979 TilingType: 2,
22980 BBox: [0, 0, pattern.dx, pattern.dy],
22981 XStep: pattern.dx,
22982 YStep: pattern.dy,
22983 Matrix: multiplyMatrix(doc._ctm, pattern.matrix),
22984 Resources: {
22985 ProcSet: ['PDF', 'Text', 'ImageB', 'ImageC', 'ImageI'],
22986 XObject: function () {
22987 var temp = {};
22988 temp[pattern.group.name] = pattern.group.xobj;
22989 return temp;
22990 }()
22991 }
22992 });
22993 ref.write('/' + pattern.group.name + ' Do');
22994 ref.end();
22995 doc.page.patterns[name] = ref;
22996
22997 if (stroke) {
22998 doc.addContent('/Pattern CS');
22999 doc.addContent('/' + name + ' SCN');
23000 } else {
23001 doc.addContent('/Pattern cs');
23002 doc.addContent('/' + name + ' scn');
23003 }
23004 }
23005
23006 function docBeginText(font, size) {
23007 if (!doc.page.fonts[font.id]) {

Callers 2

docFillColorFunction · 0.70
docStrokeColorFunction · 0.70

Calls 1

multiplyMatrixFunction · 0.70

Tested by

no test coverage detected