| 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 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 SkPicture::EncodeBitmap fEncoder; | 75 SkPicture::EncodeBitmap fEncoder; |
| 76 bool fStreamValid; | 76 bool fStreamValid; |
| 77 | 77 |
| 78 SkTDArray<SkPDFObject*> fResources; | 78 SkTDArray<SkPDFObject*> fResources; |
| 79 | 79 |
| 80 /** Create a PDF image XObject. Entries for the image properties are | 80 /** Create a PDF image XObject. Entries for the image properties are |
| 81 * automatically added to the stream dictionary. | 81 * automatically added to the stream dictionary. |
| 82 * @param stream The image stream. May be NULL. Otherwise, this | 82 * @param stream The image stream. May be NULL. Otherwise, this |
| 83 * (instead of the input bitmap) will be used as the | 83 * (instead of the input bitmap) will be used as the |
| 84 * PDF's content stream, possibly with lossless encoding. | 84 * PDF's content stream, possibly with lossless encoding. |
| 85 * Will be duplicated, and left in indeterminate state. |
| 85 * @param bitmap The image. If a stream is not given, its color data | 86 * @param bitmap The image. If a stream is not given, its color data |
| 86 * will be used as the image. If a stream is given, this | 87 * will be used as the image. If a stream is given, this |
| 87 * is used for configuration only. | 88 * is used for configuration only. |
| 88 * @param isAlpha Whether or not this is the alpha of an image. | 89 * @param isAlpha Whether or not this is the alpha of an image. |
| 89 * @param srcRect The clipping applied to bitmap before generating | 90 * @param srcRect The clipping applied to bitmap before generating |
| 90 * imageData. | 91 * imageData. |
| 91 * @param encoder A function used to encode the bitmap for compression. | 92 * @param encoder A function used to encode the bitmap for compression. |
| 92 * May be NULL. | 93 * May be NULL. |
| 93 */ | 94 */ |
| 94 SkPDFImage(SkStream* stream, const SkBitmap& bitmap, bool isAlpha, | 95 SkPDFImage(SkStream* stream, const SkBitmap& bitmap, bool isAlpha, |
| 95 const SkIRect& srcRect, SkPicture::EncodeBitmap encoder); | 96 const SkIRect& srcRect, SkPicture::EncodeBitmap encoder); |
| 96 | 97 |
| 97 /** Copy constructor, used to generate substitutes. | 98 /** Copy constructor, used to generate substitutes. |
| 98 * @param image The SkPDFImage to copy. | 99 * @param image The SkPDFImage to copy. |
| 99 */ | 100 */ |
| 100 SkPDFImage(SkPDFImage& pdfImage); | 101 SkPDFImage(SkPDFImage& pdfImage); |
| 101 | 102 |
| 102 // Populate the stream dictionary. This method returns false if | 103 // Populate the stream dictionary. This method returns false if |
| 103 // fSubstitute should be used. | 104 // fSubstitute should be used. |
| 104 virtual bool populate(SkPDFCatalog* catalog); | 105 virtual bool populate(SkPDFCatalog* catalog); |
| 105 | 106 |
| 106 typedef SkPDFStream INHERITED; | 107 typedef SkPDFStream INHERITED; |
| 107 }; | 108 }; |
| 108 | 109 |
| 109 #endif | 110 #endif |
| OLD | NEW |