OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright 2013 Google Inc. |
| 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. |
| 6 */ |
| 7 |
| 8 #ifndef SkPDFDeviceFlattener_DEFINED |
| 9 #define SkPDFDeviceFlattener_DEFINED |
| 10 |
| 11 #include "SkPDFDevice.h" |
| 12 |
| 13 class SkPDFDeviceFlattener : public SkPDFDevice { |
| 14 private: |
| 15 typedef SkPDFDevice INHERITED; |
| 16 |
| 17 SK_API SkPDFDeviceFlattener(const SkSize& pageSize, const SkRect* trimBox =
NULL); |
| 18 |
| 19 public: |
| 20 SK_API virtual ~SkPDFDeviceFlattener(); |
| 21 |
| 22 virtual void drawPoints(const SkDraw&, SkCanvas::PointMode mode, |
| 23 size_t count, const SkPoint[], |
| 24 const SkPaint& paint) SK_OVERRIDE; |
| 25 virtual void drawRect(const SkDraw&, const SkRect& r, const SkPaint& paint); |
| 26 virtual void drawPath(const SkDraw&, const SkPath& origpath, |
| 27 const SkPaint& paint, const SkMatrix* prePathMatrix, |
| 28 bool pathIsMutable) SK_OVERRIDE; |
| 29 virtual void drawText(const SkDraw&, const void* text, size_t len, |
| 30 SkScalar x, SkScalar y, const SkPaint&) SK_OVERRIDE; |
| 31 virtual void drawPosText(const SkDraw&, const void* text, size_t len, |
| 32 const SkScalar pos[], SkScalar constY, |
| 33 int scalarsPerPos, const SkPaint&) SK_OVERRIDE; |
| 34 virtual void drawTextOnPath(const SkDraw&, const void* text, size_t len, |
| 35 const SkPath& path, const SkMatrix* matrix, |
| 36 const SkPaint& paint) SK_OVERRIDE; |
| 37 private: |
| 38 |
| 39 bool mustFlatten(const SkDraw& d) const; |
| 40 bool mustPathText(const SkDraw& d, const SkPaint& paint); |
| 41 |
| 42 friend class SkDocument_PDF; |
| 43 }; |
| 44 |
| 45 #endif // SkPDFDeviceFlattener_DEFINED |
OLD | NEW |