OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #ifndef SkPDFDevice_DEFINED | 10 #ifndef SkPDFDevice_DEFINED |
(...skipping 26 matching lines...) Expand all Loading... |
37 struct ContentEntry; | 37 struct ContentEntry; |
38 struct GraphicStateEntry; | 38 struct GraphicStateEntry; |
39 struct NamedDestination; | 39 struct NamedDestination; |
40 | 40 |
41 typedef bool (*EncodeToDCTStream)(SkWStream* stream, const SkBitmap& bitmap, con
st SkIRect& rect); | 41 typedef bool (*EncodeToDCTStream)(SkWStream* stream, const SkBitmap& bitmap, con
st SkIRect& rect); |
42 | 42 |
43 /** \class SkPDFDevice | 43 /** \class SkPDFDevice |
44 | 44 |
45 The drawing context for the PDF backend. | 45 The drawing context for the PDF backend. |
46 */ | 46 */ |
47 class SkPDFDevice : public SkDevice { | 47 class SkPDFDevice : public SkRasterDevice { |
48 public: | 48 public: |
49 /** Create a PDF drawing context with the given width and height. | 49 /** Create a PDF drawing context with the given width and height. |
50 * 72 points/in means letter paper is 612x792. | 50 * 72 points/in means letter paper is 612x792. |
51 * @param pageSize Page size in points. | 51 * @param pageSize Page size in points. |
52 * @param contentSize The content size of the page in points. This will be | 52 * @param contentSize The content size of the page in points. This will be |
53 * combined with the initial transform to determine the drawing area | 53 * combined with the initial transform to determine the drawing area |
54 * (as reported by the width and height methods). Anything outside | 54 * (as reported by the width and height methods). Anything outside |
55 * of the drawing area will be clipped. | 55 * of the drawing area will be clipped. |
56 * @param initialTransform The initial transform to apply to the page. | 56 * @param initialTransform The initial transform to apply to the page. |
57 * This may be useful to, for example, move the origin in and | 57 * This may be useful to, for example, move the origin in and |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 bool handlePointAnnotation(const SkPoint* points, size_t count, | 302 bool handlePointAnnotation(const SkPoint* points, size_t count, |
303 const SkMatrix& matrix, const SkPaint& paint); | 303 const SkMatrix& matrix, const SkPaint& paint); |
304 SkPDFDict* createLinkAnnotation(const SkRect& r, const SkMatrix& matrix); | 304 SkPDFDict* createLinkAnnotation(const SkRect& r, const SkMatrix& matrix); |
305 void handleLinkToURL(SkData* urlData, const SkRect& r, | 305 void handleLinkToURL(SkData* urlData, const SkRect& r, |
306 const SkMatrix& matrix); | 306 const SkMatrix& matrix); |
307 void handleLinkToNamedDest(SkData* nameData, const SkRect& r, | 307 void handleLinkToNamedDest(SkData* nameData, const SkRect& r, |
308 const SkMatrix& matrix); | 308 const SkMatrix& matrix); |
309 void defineNamedDestination(SkData* nameData, const SkPoint& point, | 309 void defineNamedDestination(SkData* nameData, const SkPoint& point, |
310 const SkMatrix& matrix); | 310 const SkMatrix& matrix); |
311 | 311 |
312 typedef SkDevice INHERITED; | 312 typedef SkRasterDevice INHERITED; |
313 }; | 313 }; |
314 | 314 |
315 #endif | 315 #endif |
OLD | NEW |