| 409 | } |
| 410 | |
| 411 | void 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 |
nothing calls this directly
no test coverage detected