2011-07-28 14:26:00 +00:00
|
|
|
|
2010-10-26 19:54:45 +00:00
|
|
|
/*
|
2011-07-28 14:26:00 +00:00
|
|
|
* Copyright 2010 The Android Open Source Project
|
2010-10-26 19:54:45 +00:00
|
|
|
*
|
2011-07-28 14:26:00 +00:00
|
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
|
|
* found in the LICENSE file.
|
2010-10-26 19:54:45 +00:00
|
|
|
*/
|
|
|
|
|
2011-07-28 14:26:00 +00:00
|
|
|
|
2010-10-26 19:54:45 +00:00
|
|
|
#ifndef SkPDFFormXObject_DEFINED
|
|
|
|
#define SkPDFFormXObject_DEFINED
|
|
|
|
|
|
|
|
#include "SkPDFStream.h"
|
|
|
|
#include "SkPDFTypes.h"
|
|
|
|
#include "SkRefCnt.h"
|
|
|
|
#include "SkString.h"
|
|
|
|
|
|
|
|
class SkMatrix;
|
|
|
|
class SkPDFDevice;
|
|
|
|
class SkPDFCatalog;
|
|
|
|
|
|
|
|
/** \class SkPDFFormXObject
|
|
|
|
|
2011-02-24 23:14:04 +00:00
|
|
|
A form XObject; a self contained description of graphics objects. A form
|
2010-10-26 19:54:45 +00:00
|
|
|
XObject is basically a page object with slightly different syntax, that
|
|
|
|
can be drawn onto a page.
|
|
|
|
*/
|
|
|
|
|
|
|
|
// The caller could keep track of the form XObjects it creates and
|
|
|
|
// canonicalize them, but the Skia API doesn't provide enough context to
|
|
|
|
// automatically do it (trivially).
|
2011-07-20 17:39:01 +00:00
|
|
|
class SkPDFFormXObject : public SkPDFStream {
|
2010-10-26 19:54:45 +00:00
|
|
|
public:
|
|
|
|
/** Create a PDF form XObject. Entries for the dictionary entries are
|
|
|
|
* automatically added.
|
|
|
|
* @param device The set of graphical elements on this form.
|
|
|
|
*/
|
2011-02-03 21:46:10 +00:00
|
|
|
explicit SkPDFFormXObject(SkPDFDevice* device);
|
2010-10-26 19:54:45 +00:00
|
|
|
virtual ~SkPDFFormXObject();
|
|
|
|
|
|
|
|
// The SkPDFObject interface.
|
|
|
|
virtual void getResources(SkTDArray<SkPDFObject*>* resourceList);
|
|
|
|
|
|
|
|
private:
|
2011-02-08 19:22:40 +00:00
|
|
|
SkTDArray<SkPDFObject*> fResources;
|
2010-10-26 19:54:45 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|