aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/pdf
diff options
context:
space:
mode:
Diffstat (limited to 'include/pdf')
-rw-r--r--include/pdf/SkPDFDevice.h11
-rw-r--r--include/pdf/SkPDFDocument.h2
-rw-r--r--include/pdf/SkPDFPage.h10
-rw-r--r--include/pdf/SkPDFTypes.h9
4 files changed, 22 insertions, 10 deletions
diff --git a/include/pdf/SkPDFDevice.h b/include/pdf/SkPDFDevice.h
index b972dd4752..7310229bb7 100644
--- a/include/pdf/SkPDFDevice.h
+++ b/include/pdf/SkPDFDevice.h
@@ -20,6 +20,8 @@
#include "SkRefCnt.h"
#include "SkDevice.h"
#include "SkString.h"
+#include "SkPaint.h"
+#include "SkPath.h"
class SkPDFArray;
class SkPDFDevice;
@@ -101,14 +103,14 @@ public:
*/
const SkRefPtr<SkPDFDict>& getResourceDict();
- /** Get the list of resouces (PDF objects) used on this page
- * @param resouceList A list to append the resouces to.
+ /** Get the list of resources (PDF objects) used on this page.
+ * @param resourceList A list to append the resources to.
*/
- void getResouces(SkTDArray<SkPDFObject*>* resouceList);
+ void getResources(SkTDArray<SkPDFObject*>* resourceList) const;
/** Returns the media box for this device.
*/
- SkRefPtr<SkPDFArray> getMediaBox();
+ SkRefPtr<SkPDFArray> getMediaBox() const;
/** Returns a string with the page contents.
* @param flipOrigin Flip the origin between top and bottom.
@@ -144,6 +146,7 @@ private:
void appendRectangle(SkScalar x, SkScalar y, SkScalar w, SkScalar h);
void closePath();
void strokePath();
+ void paintPath(SkPaint::Style style, SkPath::FillType fill);
void internalDrawBitmap(const SkMatrix& matrix, const SkBitmap& bitmap,
const SkPaint& paint);
diff --git a/include/pdf/SkPDFDocument.h b/include/pdf/SkPDFDocument.h
index 91dd379214..54b86c4a29 100644
--- a/include/pdf/SkPDFDocument.h
+++ b/include/pdf/SkPDFDocument.h
@@ -57,7 +57,7 @@ private:
SkTDArray<SkPDFDict*> fPageTree;
SkRefPtr<SkPDFDict> fDocCatalog;
SkTDArray<SkPDFObject*> fPageResources;
- int fSecondPageFirstResouceIndex;
+ int fSecondPageFirstResourceIndex;
SkRefPtr<SkPDFDict> fTrailerDict;
diff --git a/include/pdf/SkPDFPage.h b/include/pdf/SkPDFPage.h
index 7e96212bbf..0831cb504e 100644
--- a/include/pdf/SkPDFPage.h
+++ b/include/pdf/SkPDFPage.h
@@ -45,11 +45,11 @@ public:
* finalizePage has been called. This function adds the page content
* to the passed catalog, so it must be called for each document
* that the page is part of.
- * @param catalog The catalog to add page content objects to.
- * @param firstPage Indicate if this is the first page of a document.
- * @param resouceObjects The resource objects used on the page are added
- * to this array. This gives the caller a chance
- * to deduplicate resources across pages.
+ * @param catalog The catalog to add page content objects to.
+ * @param firstPage Indicate if this is the first page of a document.
+ * @param resourceObjects The resource objects used on the page are added
+ * to this array. This gives the caller a chance
+ * to deduplicate resources across pages.
*/
void finalizePage(SkPDFCatalog* catalog, bool firstPage,
SkTDArray<SkPDFObject*>* resourceObjects);
diff --git a/include/pdf/SkPDFTypes.h b/include/pdf/SkPDFTypes.h
index 2066352167..a281628a23 100644
--- a/include/pdf/SkPDFTypes.h
+++ b/include/pdf/SkPDFTypes.h
@@ -55,6 +55,15 @@ public:
*/
virtual size_t getOutputSize(SkPDFCatalog* catalog, bool indirect);
+ /** If this object explicitly depends on other objects, add them to the
+ * end of the list. This only applies to higher level object, where
+ * the depenency is explicit and introduced by the class. i.e. an
+ * SkPDFImage added to an SkPDFDevice, but not an SkPDFObjRef added to
+ * an SkPDFArray.
+ * @param resourceList The list to append dependant resources to.
+ */
+ virtual void getResources(SkTDArray<SkPDFObject*>* resourceList);
+
/** Helper function to output an indirect object.
* @param catalog The object catalog to use.
* @param stream The writable output stream to send the output to.