Chromium Code Reviews| 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 SkPDFFormXObject_DEFINED | 10 #ifndef SkPDFFormXObject_DEFINED |
| 11 #define SkPDFFormXObject_DEFINED | 11 #define SkPDFFormXObject_DEFINED |
| 12 | 12 |
| 13 #include "SkPDFStream.h" | 13 #include "SkPDFStream.h" |
| 14 #include "SkPDFTypes.h" | 14 #include "SkPDFTypes.h" |
| 15 #include "SkRect.h" | |
| 15 #include "SkRefCnt.h" | 16 #include "SkRefCnt.h" |
| 16 #include "SkString.h" | 17 #include "SkString.h" |
| 17 | 18 |
| 18 class SkMatrix; | 19 class SkMatrix; |
| 19 class SkPDFDevice; | 20 class SkPDFDevice; |
| 20 class SkPDFCatalog; | 21 class SkPDFCatalog; |
| 21 | 22 |
| 22 /** \class SkPDFFormXObject | 23 /** \class SkPDFFormXObject |
| 23 | 24 |
| 24 A form XObject; a self contained description of graphics objects. A form | 25 A form XObject; a self contained description of graphics objects. A form |
| 25 XObject is basically a page object with slightly different syntax, that | 26 XObject is basically a page object with slightly different syntax, that |
| 26 can be drawn onto a page. | 27 can be drawn onto a page. |
| 27 */ | 28 */ |
| 28 | 29 |
| 29 // The caller could keep track of the form XObjects it creates and | 30 // The caller could keep track of the form XObjects it creates and |
| 30 // canonicalize them, but the Skia API doesn't provide enough context to | 31 // canonicalize them, but the Skia API doesn't provide enough context to |
| 31 // automatically do it (trivially). | 32 // automatically do it (trivially). |
| 32 class SkPDFFormXObject : public SkPDFStream { | 33 class SkPDFFormXObject : public SkPDFStream { |
| 33 public: | 34 public: |
| 34 /** Create a PDF form XObject. Entries for the dictionary entries are | 35 /** Create a PDF form XObject. Entries for the dictionary entries are |
| 35 * automatically added. | 36 * automatically added. |
| 36 * @param device The set of graphical elements on this form. | 37 * @param device The set of graphical elements on this form. |
| 37 */ | 38 */ |
| 38 explicit SkPDFFormXObject(SkPDFDevice* device); | 39 explicit SkPDFFormXObject(SkPDFDevice* device); |
| 40 explicit SkPDFFormXObject(SkStream* content, SkPDFDict* resourceDict, | |
|
vandebo (ex-Chrome)
2013/07/03 17:07:01
nit: I like parameters to have a logical order: co
vandebo (ex-Chrome)
2013/07/03 17:07:01
This constructor needs a comment block.
ducky
2013/07/03 23:32:09
Done.
ducky
2013/07/03 23:32:09
Done.
| |
| 41 SkTSet<SkPDFObject*>& resources, | |
| 42 SkRect bbox); | |
| 39 virtual ~SkPDFFormXObject(); | 43 virtual ~SkPDFFormXObject(); |
| 40 | 44 |
| 41 // The SkPDFObject interface. | 45 // The SkPDFObject interface. |
| 42 virtual void getResources(const SkTSet<SkPDFObject*>& knownResourceObjects, | 46 virtual void getResources(const SkTSet<SkPDFObject*>& knownResourceObjects, |
| 43 SkTSet<SkPDFObject*>* newResourceObjects); | 47 SkTSet<SkPDFObject*>* newResourceObjects); |
| 44 | 48 |
| 45 private: | 49 private: |
| 46 SkTSet<SkPDFObject*> fResources; | 50 SkTSet<SkPDFObject*> fResources; |
| 47 }; | 51 }; |
| 48 | 52 |
| 49 #endif | 53 #endif |
| OLD | NEW |