Skia
2DGraphicsLibrary
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SkDocument::Attribute Struct Reference

Set the document's metadata, if supported by the document type. More...

#include <SkDocument.h>

Public Member Functions

 Attribute (const SkString &k, const SkString &v)
 

Public Attributes

SkString fKey
 
SkString fValue
 

Detailed Description

Set the document's metadata, if supported by the document type.

The creationDate and modifiedDate parameters can be nullptr. For example:

SkDocument* make_doc(SkWStream* output) { std::vector<SkDocument::Attribute> info; info.emplace_back(SkString("Title"), SkString("...")); info.emplace_back(SkString("Author"), SkString("...")); info.emplace_back(SkString("Subject"), SkString("...")); info.emplace_back(SkString("Keywords"), SkString("...")); info.emplace_back(SkString("Creator"), SkString("...")); SkTime::DateTime now; SkTime::GetDateTime(&now); SkDocument* doc = SkDocument::CreatePDF(output); doc->setMetadata(&info[0], (int)info.size(), &now, &now); return doc; }


The documentation for this struct was generated from the following file: