1 2 /* 3 * Copyright 2010 The Android Open Source Project 4 * 5 * Use of this source code is governed by a BSD-style license that can be 6 * found in the LICENSE file. 7 */ 8 9 10 #ifndef SkPDFFormXObject_DEFINED 11 #define SkPDFFormXObject_DEFINED 12 13 #include "SkPDFStream.h" 14 #include "SkPDFTypes.h" 15 #include "SkRefCnt.h" 16 #include "SkString.h" 17 18 class SkMatrix; 19 class SkPDFDevice; 20 class SkPDFCatalog; 21 22 /** \class SkPDFFormXObject 23 24 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 can be drawn onto a page. 27 */ 28 29 // 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 // automatically do it (trivially). 32 class SkPDFFormXObject : public SkPDFStream { 33 public: 34 /** Create a PDF form XObject. Entries for the dictionary entries are 35 * automatically added. 36 * @param device The set of graphical elements on this form. 37 */ 38 explicit SkPDFFormXObject(SkPDFDevice* device); 39 virtual ~SkPDFFormXObject(); 40 41 // The SkPDFObject interface. 42 virtual void getResources(SkTDArray<SkPDFObject*>* resourceList); 43 44 private: 45 SkTDArray<SkPDFObject*> fResources; 46 }; 47 48 #endif 49