Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright 2010 The Android Open Source Project | 2 * Copyright 2010 The Android Open Source Project |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 | 8 |
| 9 #ifndef SkPDFFormXObject_DEFINED | 9 #ifndef SkPDFFormXObject_DEFINED |
| 10 #define SkPDFFormXObject_DEFINED | 10 #define SkPDFFormXObject_DEFINED |
| 11 | 11 |
| 12 #include "SkPDFStream.h" | 12 #include "SkPDFStream.h" |
| 13 #include "SkPDFDevice.h" | |
| 13 | 14 |
| 14 class SkPDFArray; | 15 /** A form XObject is a self contained description of graphics |
| 15 class SkPDFDevice; | 16 objects. A form XObject is basically a page object with slightly |
|
tomhudson
2016/07/27 20:30:58
Match tense: is a ... of *a* graphics object.
Cut
hal.canary
2016/07/27 20:41:11
Done.
| |
| 16 class SkPDFDict; | 17 different syntax, that can be drawn onto a page. |
| 17 struct SkRect; | |
| 18 | |
| 19 /** \class SkPDFFormXObject | |
| 20 | |
| 21 A form XObject; a self contained description of graphics objects. A form | |
| 22 XObject is basically a page object with slightly different syntax, that | |
| 23 can be drawn onto a page. | |
| 24 */ | 18 */ |
| 25 | 19 sk_sp<SkPDFObject> SkPDFMakeFormXObject(std::unique_ptr<SkStreamAsset> content, |
| 26 // The caller could keep track of the form XObjects it creates and | 20 sk_sp<SkPDFArray> mediaBox, |
| 27 // canonicalize them, but the Skia API doesn't provide enough context to | 21 sk_sp<SkPDFDict> resourceDict, |
| 28 // automatically do it (trivially). | 22 const char* colorSpace); |
| 29 class SkPDFFormXObject final : public SkPDFStream { | |
| 30 public: | |
| 31 /** Create a PDF form XObject. Entries for the dictionary entries are | |
| 32 * automatically added. | |
| 33 * @param device The set of graphical elements on this form. | |
| 34 */ | |
| 35 explicit SkPDFFormXObject(SkPDFDevice* device); | |
| 36 /** | |
| 37 * Create a PDF form XObject from a raw content stream and associated | |
| 38 * resources. | |
| 39 */ | |
| 40 explicit SkPDFFormXObject(std::unique_ptr<SkStreamAsset> content, | |
| 41 SkRect bbox, | |
| 42 SkPDFDict* resourceDict); | |
| 43 virtual ~SkPDFFormXObject(); | |
| 44 | |
| 45 private: | |
| 46 void init(const char* colorSpace, | |
| 47 SkPDFDict* resourceDict, SkPDFArray* bbox); | |
| 48 }; | |
| 49 | |
| 50 #endif | 23 #endif |
| OLD | NEW |