OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2010 The Android Open Source Project | 3 * Copyright 2010 The Android Open Source Project |
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 SkPDFImage_DEFINED | 10 #ifndef SkPDFImage_DEFINED |
11 #define SkPDFImage_DEFINED | 11 #define SkPDFImage_DEFINED |
12 | 12 |
13 #include "SkPicture.h" | 13 #include "SkPicture.h" |
14 #include "SkPDFDevice.h" | 14 #include "SkPDFDevice.h" |
15 #include "SkPDFStream.h" | 15 #include "SkPDFStream.h" |
16 #include "SkPDFTypes.h" | 16 #include "SkPDFTypes.h" |
17 #include "SkRefCnt.h" | 17 #include "SkRefCnt.h" |
18 | 18 |
19 class SkBitmap; | 19 class SkBitmap; |
20 class SkData; | 20 class SkData; |
21 class SkPDFCatalog; | 21 class SkPDFCatalog; |
22 struct SkIRect; | 22 struct SkIRect; |
23 | 23 |
24 /** | 24 /** |
25 * Return the mose efficient availible encoding of the given bitmap. | 25 * Return the mose efficient availible encoding of the given bitmap. |
26 */ | 26 */ |
27 SkPDFObject* SkPDFCreateImageObject(const SkBitmap&, const SkIRect& subset); | 27 SkPDFObject* SkPDFCreateImageObject(SkPDFCanon* canon, |
| 28 const SkBitmap&, |
| 29 const SkIRect& subset); |
28 | 30 |
29 /** \class SkPDFImage | 31 /** \class SkPDFImage |
30 | 32 |
31 An image XObject. | 33 An image XObject. |
32 */ | 34 */ |
33 | 35 |
34 // We could play the same trick here as is done in SkPDFGraphicState, storing | 36 // We could play the same trick here as is done in SkPDFGraphicState, storing |
35 // a copy of the Bitmap object (not the pixels), the pixel generation number, | 37 // a copy of the Bitmap object (not the pixels), the pixel generation number, |
36 // and settings used from the paint to canonicalize image objects. | 38 // and settings used from the paint to canonicalize image objects. |
37 class SkPDFImage : public SkPDFStream { | 39 class SkPDFImage : public SkPDFStream { |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 SkPDFImage(SkPDFImage& pdfImage); | 82 SkPDFImage(SkPDFImage& pdfImage); |
81 | 83 |
82 // Populate the stream dictionary. This method returns false if | 84 // Populate the stream dictionary. This method returns false if |
83 // fSubstitute should be used. | 85 // fSubstitute should be used. |
84 virtual bool populate(SkPDFCatalog* catalog); | 86 virtual bool populate(SkPDFCatalog* catalog); |
85 | 87 |
86 typedef SkPDFStream INHERITED; | 88 typedef SkPDFStream INHERITED; |
87 }; | 89 }; |
88 | 90 |
89 #endif | 91 #endif |
OLD | NEW |