MCPcopy Create free account
hub / github.com/Tencent/tgfx / PopulateTilingPatternDict

Method PopulateTilingPatternDict

src/pdf/PDFUtils.cpp:411–429  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

409}
410
411void PDFUtils::PopulateTilingPatternDict(PDFDictionary* pattern, const Rect& boundBox,
412 std::unique_ptr<PDFDictionary> resources,
413 const Matrix& matrix) {
414 constexpr int Tiling_PatternType = 1;
415 constexpr int ColoredTilingPattern_PaintType = 1;
416 constexpr int ConstantSpacing_TilingType = 1;
417
418 pattern->insertName("Type", "Pattern");
419 pattern->insertInt("PatternType", Tiling_PatternType);
420 pattern->insertInt("PaintType", ColoredTilingPattern_PaintType);
421 pattern->insertInt("TilingType", ConstantSpacing_TilingType);
422 pattern->insertObject("BBox", PDFUtils::RectToArray(boundBox));
423 pattern->insertScalar("XStep", boundBox.width());
424 pattern->insertScalar("YStep", boundBox.height());
425 pattern->insertObject("Resources", std::move(resources));
426 if (!matrix.isIdentity()) {
427 pattern->insertObject("Matrix", PDFUtils::MatrixToArray(matrix));
428 }
429}
430
431} // namespace tgfx

Callers

nothing calls this directly

Calls 7

insertNameMethod · 0.80
insertIntMethod · 0.80
insertObjectMethod · 0.80
insertScalarMethod · 0.80
isIdentityMethod · 0.80
widthMethod · 0.45
heightMethod · 0.45

Tested by

no test coverage detected