37#ifdef SK_PDF_TEST_TAGS_OUTPUT_PATH
46 metadata.
fTitle =
"Example Tagged PDF";
54 auto root = std::make_unique<PDFTag>();
56 root->fTypeString =
"Document";
57 root->fLang =
"en-US";
60 auto p1 = std::make_unique<PDFTag>();
62 p1->fAdditionalNodeIds = {3, 4};
63 p1->fTypeString =
"P";
64 root->fChildVector.push_back(std::move(p1));
67 auto p2 = std::make_unique<PDFTag>();
69 p2->fAdditionalNodeIds = {6, 7};
70 p2->fTypeString =
"P";
71 root->fChildVector.push_back(std::move(p2));
75 &outputStream, metadata);
81 document->beginPage(pageSize.
width(),
100DEF_TEST(SkPDF_tagged_pruning_empty, r) {
102#ifdef SK_PDF_TEST_TAGS_OUTPUT_PATH
111 metadata.
fTitle =
"Example Tagged PDF";
119 auto root = std::make_unique<PDFTag>();
121 root->fTypeString =
"Document";
122 root->fLang =
"en-US";
125 auto p1 = std::make_unique<PDFTag>();
127 p1->fAdditionalNodeIds = {3, 4};
128 p1->fTypeString =
"P";
129 root->fChildVector.push_back(std::move(p1));
132 auto p2 = std::make_unique<PDFTag>();
134 p2->fAdditionalNodeIds = {6, 7};
135 p2->fTypeString =
"P";
136 root->fChildVector.push_back(std::move(p2));
140 &outputStream, metadata);
146 document->beginPage(pageSize.
width(),
153 outputStream.
flush();
constexpr SkColor SK_ColorBLACK
#define DEF_TEST(name, reporter)
#define REQUIRE_PDF_DOCUMENT(TEST_NAME, REPORTER)
void drawRect(const SkRect &rect, const SkPaint &paint)
void drawString(const char str[], SkScalar x, SkScalar y, const SkFont &font, const SkPaint &paint)
void GetDateTime(SkPDF::DateTime *)
SK_API sk_sp< SkDocument > MakeDocument(SkWStream *stream, const Metadata &metadata)
SK_API void SetNodeId(SkCanvas *dst, int nodeID)
font
Font Metadata and Metrics.
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)
static constexpr SkSize Make(SkScalar w, SkScalar h)