Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(392)

Side by Side Diff: src/pdf/SkPDFDeviceFlattener.h

Issue 24811002: Update the SkDocument interface to allow for 1) abort won't emit pdf, 2) close can report success/f… (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: updates Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698