gfx/skia/trunk/src/pdf/SkPDFFormXObject.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1
michael@0 2 /*
michael@0 3 * Copyright 2010 The Android Open Source Project
michael@0 4 *
michael@0 5 * Use of this source code is governed by a BSD-style license that can be
michael@0 6 * found in the LICENSE file.
michael@0 7 */
michael@0 8
michael@0 9
michael@0 10 #ifndef SkPDFFormXObject_DEFINED
michael@0 11 #define SkPDFFormXObject_DEFINED
michael@0 12
michael@0 13 #include "SkPDFStream.h"
michael@0 14 #include "SkPDFTypes.h"
michael@0 15 #include "SkRect.h"
michael@0 16 #include "SkRefCnt.h"
michael@0 17 #include "SkPDFResourceDict.h"
michael@0 18 #include "SkString.h"
michael@0 19
michael@0 20 class SkMatrix;
michael@0 21 class SkPDFDevice;
michael@0 22 class SkPDFCatalog;
michael@0 23
michael@0 24 /** \class SkPDFFormXObject
michael@0 25
michael@0 26 A form XObject; a self contained description of graphics objects. A form
michael@0 27 XObject is basically a page object with slightly different syntax, that
michael@0 28 can be drawn onto a page.
michael@0 29 */
michael@0 30
michael@0 31 // The caller could keep track of the form XObjects it creates and
michael@0 32 // canonicalize them, but the Skia API doesn't provide enough context to
michael@0 33 // automatically do it (trivially).
michael@0 34 class SkPDFFormXObject : public SkPDFStream {
michael@0 35 public:
michael@0 36 /** Create a PDF form XObject. Entries for the dictionary entries are
michael@0 37 * automatically added.
michael@0 38 * @param device The set of graphical elements on this form.
michael@0 39 */
michael@0 40 explicit SkPDFFormXObject(SkPDFDevice* device);
michael@0 41 /**
michael@0 42 * Create a PDF form XObject from a raw content stream and associated
michael@0 43 * resources.
michael@0 44 */
michael@0 45 explicit SkPDFFormXObject(SkStream* content,
michael@0 46 SkRect bbox,
michael@0 47 SkPDFResourceDict* resourceDict);
michael@0 48 virtual ~SkPDFFormXObject();
michael@0 49
michael@0 50 // The SkPDFObject interface.
michael@0 51 virtual void getResources(const SkTSet<SkPDFObject*>& knownResourceObjects,
michael@0 52 SkTSet<SkPDFObject*>* newResourceObjects);
michael@0 53
michael@0 54 private:
michael@0 55 void init(const char* colorSpace,
michael@0 56 SkPDFDict* resourceDict, SkPDFArray* bbox);
michael@0 57
michael@0 58 SkTSet<SkPDFObject*> fResources;
michael@0 59 };
michael@0 60
michael@0 61 #endif

mercurial