Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Side by Side Diff: src/pdf/SkPDFFormXObject.h

Issue 18585002: Implemented transparent gradients (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Merge new SkPDFResourceDict method names Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/pdf/SkPDFDevice.cpp ('k') | src/pdf/SkPDFFormXObject.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
17 #include "SkPDFResourceDict.h"
16 #include "SkString.h" 18 #include "SkString.h"
17 19
18 class SkMatrix; 20 class SkMatrix;
19 class SkPDFDevice; 21 class SkPDFDevice;
20 class SkPDFCatalog; 22 class SkPDFCatalog;
21 23
22 /** \class SkPDFFormXObject 24 /** \class SkPDFFormXObject
23 25
24 A form XObject; a self contained description of graphics objects. A form 26 A form XObject; a self contained description of graphics objects. A form
25 XObject is basically a page object with slightly different syntax, that 27 XObject is basically a page object with slightly different syntax, that
26 can be drawn onto a page. 28 can be drawn onto a page.
27 */ 29 */
28 30
29 // The caller could keep track of the form XObjects it creates and 31 // 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 32 // canonicalize them, but the Skia API doesn't provide enough context to
31 // automatically do it (trivially). 33 // automatically do it (trivially).
32 class SkPDFFormXObject : public SkPDFStream { 34 class SkPDFFormXObject : public SkPDFStream {
33 public: 35 public:
34 /** Create a PDF form XObject. Entries for the dictionary entries are 36 /** Create a PDF form XObject. Entries for the dictionary entries are
35 * automatically added. 37 * automatically added.
36 * @param device The set of graphical elements on this form. 38 * @param device The set of graphical elements on this form.
37 */ 39 */
38 explicit SkPDFFormXObject(SkPDFDevice* device); 40 explicit SkPDFFormXObject(SkPDFDevice* device);
41 /**
42 * Create a PDF form XObject from a raw content stream and associated
43 * resources.
44 */
45 explicit SkPDFFormXObject(SkStream* content,
46 SkRect bbox,
47 SkPDFResourceDict* resourceDict);
39 virtual ~SkPDFFormXObject(); 48 virtual ~SkPDFFormXObject();
40 49
41 // The SkPDFObject interface. 50 // The SkPDFObject interface.
42 virtual void getResources(const SkTSet<SkPDFObject*>& knownResourceObjects, 51 virtual void getResources(const SkTSet<SkPDFObject*>& knownResourceObjects,
43 SkTSet<SkPDFObject*>* newResourceObjects); 52 SkTSet<SkPDFObject*>* newResourceObjects);
44 53
45 private: 54 private:
55 void init(const char* colorSpace,
56 SkPDFDict* resourceDict, SkPDFArray* bbox);
57
46 SkTSet<SkPDFObject*> fResources; 58 SkTSet<SkPDFObject*> fResources;
47 }; 59 };
48 60
49 #endif 61 #endif
OLDNEW
« no previous file with comments | « src/pdf/SkPDFDevice.cpp ('k') | src/pdf/SkPDFFormXObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698