| 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 "SkRect.h" | 
| 16 #include "SkRefCnt.h" | 16 #include "SkRefCnt.h" | 
| 17 #include "SkPDFResourceDict.h" |  | 
| 18 #include "SkString.h" | 17 #include "SkString.h" | 
| 19 | 18 | 
| 20 class SkMatrix; | 19 class SkMatrix; | 
| 21 class SkPDFDevice; | 20 class SkPDFDevice; | 
| 22 class SkPDFObjNumMap; | 21 class SkPDFObjNumMap; | 
| 23 | 22 | 
| 24 /** \class SkPDFFormXObject | 23 /** \class SkPDFFormXObject | 
| 25 | 24 | 
| 26     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 | 
| 27     XObject is basically a page object with slightly different syntax, that | 26     XObject is basically a page object with slightly different syntax, that | 
| 28     can be drawn onto a page. | 27     can be drawn onto a page. | 
| 29 */ | 28 */ | 
| 30 | 29 | 
| 31 // 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 | 
| 32 // 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 | 
| 33 // automatically do it (trivially). | 32 // automatically do it (trivially). | 
| 34 class SkPDFFormXObject : public SkPDFStream { | 33 class SkPDFFormXObject : public SkPDFStream { | 
| 35 public: | 34 public: | 
| 36     /** Create a PDF form XObject. Entries for the dictionary entries are | 35     /** Create a PDF form XObject. Entries for the dictionary entries are | 
| 37      *  automatically added. | 36      *  automatically added. | 
| 38      *  @param device      The set of graphical elements on this form. | 37      *  @param device      The set of graphical elements on this form. | 
| 39      */ | 38      */ | 
| 40     explicit SkPDFFormXObject(SkPDFDevice* device); | 39     explicit SkPDFFormXObject(SkPDFDevice* device); | 
| 41     /** | 40     /** | 
| 42      * Create a PDF form XObject from a raw content stream and associated | 41      * Create a PDF form XObject from a raw content stream and associated | 
| 43      * resources. | 42      * resources. | 
| 44      */ | 43      */ | 
| 45     explicit SkPDFFormXObject(SkStream* content, | 44     explicit SkPDFFormXObject(SkStream* content, | 
| 46                               SkRect bbox, | 45                               SkRect bbox, | 
| 47                               SkPDFResourceDict* resourceDict); | 46                               SkPDFDict* resourceDict); | 
| 48     virtual ~SkPDFFormXObject(); | 47     virtual ~SkPDFFormXObject(); | 
| 49 | 48 | 
| 50 private: | 49 private: | 
| 51     void init(const char* colorSpace, | 50     void init(const char* colorSpace, | 
| 52               SkPDFDict* resourceDict, SkPDFArray* bbox); | 51               SkPDFDict* resourceDict, SkPDFArray* bbox); | 
| 53 }; | 52 }; | 
| 54 | 53 | 
| 55 #endif | 54 #endif | 
| OLD | NEW | 
|---|