diff options
author | 2013-10-14 13:42:12 +0000 | |
---|---|---|
committer | 2013-10-14 13:42:12 +0000 | |
commit | 5e00989a283111cef05bed8102e45c16651e43e4 (patch) | |
tree | f392a48807724566537fd8d128f00ce175f1417c /include | |
parent | 1108fc3058e64a9363f7ea4ef41e2b04ca51f539 (diff) |
Add SkPDFDeviceFlatenner which extends SkPDFDevice to add support to flatten the path and the text when we have perspective.
prepare to deprecate SkPDFDevice constructor, and route gm and render_pdfs to use SkDocument::Create pdf interface instead. - controlled by a flag
add comments where we are supposed to flatten other features (paint, shaders, ... )
R=reed@google.com, bungeman@google.com, scroggo@google.com, vandebo@chromium.org, bsalomon@google.com
Author: edisonn@google.com
Review URL: https://codereview.chromium.org/24811002
git-svn-id: http://skia.googlecode.com/svn/trunk@11751 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkDraw.h | 8 | ||||
-rw-r--r-- | include/pdf/SkPDFDevice.h | 8 |
2 files changed, 11 insertions, 5 deletions
diff --git a/include/core/SkDraw.h b/include/core/SkDraw.h index 1c2c66efb3..772e11e00d 100644 --- a/include/core/SkDraw.h +++ b/include/core/SkDraw.h @@ -97,16 +97,16 @@ public: static RectType ComputeRectType(const SkPaint&, const SkMatrix&, SkPoint* strokeSize); -private: void drawText_asPaths(const char text[], size_t byteLength, SkScalar x, SkScalar y, const SkPaint&) const; - void drawDevMask(const SkMask& mask, const SkPaint&) const; - void drawBitmapAsMask(const SkBitmap&, const SkPaint&) const; - void drawPosText_asPaths(const char text[], size_t byteLength, const SkScalar pos[], SkScalar constY, int scalarsPerPosition, const SkPaint&) const; +private: + void drawDevMask(const SkMask& mask, const SkPaint&) const; + void drawBitmapAsMask(const SkBitmap&, const SkPaint&) const; + /** * Return the current clip bounds, in local coordinates, with slop to account * for antialiasing or hairlines (i.e. device-bounds outset by 1, and then diff --git a/include/pdf/SkPDFDevice.h b/include/pdf/SkPDFDevice.h index 30ec2dc630..d668be5df3 100644 --- a/include/pdf/SkPDFDevice.h +++ b/include/pdf/SkPDFDevice.h @@ -11,6 +11,7 @@ #define SkPDFDevice_DEFINED #include "SkBitmapDevice.h" +#include "SkBitmap.h" #include "SkCanvas.h" #include "SkPaint.h" #include "SkPath.h" @@ -63,7 +64,7 @@ public: * inverse scale+translate to accommodate the one that SkPDFDevice * always does. */ - // TODO(vandebo): The sizes should be SkSize and not SkISize. + // Deprecated, please use SkDocument::CreatePdf() instead. SK_API SkPDFDevice(const SkISize& pageSize, const SkISize& contentSize, const SkMatrix& initialTransform); SK_API virtual ~SkPDFDevice(); @@ -311,6 +312,11 @@ private: const SkMatrix& matrix); typedef SkBitmapDevice INHERITED; + + // TODO(edisonn): Only SkDocument_PDF and SkPDFImageShader should be able to create + // an SkPDFDevice + //friend class SkDocument_PDF; + //friend class SkPDFImageShader; }; #endif |