aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar vandebo@chromium.org <vandebo@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2010-10-26 19:45:06 +0000
committerGravatar vandebo@chromium.org <vandebo@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2010-10-26 19:45:06 +0000
commitddbbd805b5b453e12cda0b3300e5655d8fb2bc19 (patch)
tree7178ce7acd6be7334602ce0466f3ef95b099834e /include
parent99a45d3b5a2f492b3ee3d5d8c8baa52745c4b2fa (diff)
Cleanup/unify matrix transform for PDF backend.
Review URL: http://codereview.appspot.com/2719041 git-svn-id: http://skia.googlecode.com/svn/trunk@617 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include')
-rw-r--r--include/core/SkMatrix.h7
-rw-r--r--include/pdf/SkPDFDevice.h3
2 files changed, 9 insertions, 1 deletions
diff --git a/include/core/SkMatrix.h b/include/core/SkMatrix.h
index 7ef7d8cd61..5c82d78614 100644
--- a/include/core/SkMatrix.h
+++ b/include/core/SkMatrix.h
@@ -292,6 +292,13 @@ public:
*/
bool invert(SkMatrix* inverse) const;
+ /** Fills the passed array with the tranform values in the right order
+ for PDFs. If the matrix is a perspective transform, returns false
+ and fills the array with an identity transform.
+ @param transform The array to fill in.
+ */
+ bool pdfTransform(SkScalar transform[6]) const;
+
/** Apply this matrix to the array of points specified by src, and write
the transformed points into the array of points specified by dst.
dst[] = M * src[]
diff --git a/include/pdf/SkPDFDevice.h b/include/pdf/SkPDFDevice.h
index 5421299226..fb74c63a1b 100644
--- a/include/pdf/SkPDFDevice.h
+++ b/include/pdf/SkPDFDevice.h
@@ -110,8 +110,9 @@ public:
SkRefPtr<SkPDFArray> getMediaBox();
/** Returns a string with the page contents.
+ * @param flipOrigin Flip the origin between top and bottom.
*/
- SkString content();
+ SkString content(bool flipOrigin) const;
private:
int fWidth;