xref: /aosp_15_r20/external/skia/src/pdf/SkPDFFormXObject.h (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1 /*
2  * Copyright 2010 The Android Open Source Project
3  *
4  * Use of this source code is governed by a BSD-style license that can be
5  * found in the LICENSE file.
6  */
7 
8 
9 #ifndef SkPDFFormXObject_DEFINED
10 #define SkPDFFormXObject_DEFINED
11 
12 #include "src/pdf/SkPDFTypes.h"
13 
14 #include <memory>
15 
16 class SkMatrix;
17 class SkPDFDocument;
18 class SkStreamAsset;
19 
20 /** A form XObject is a self contained description of a graphics
21     object.  A form XObject is a page object with slightly different
22     syntax, that can be drawn into a page content stream, just like a
23     bitmap XObject can be drawn into a page content stream.
24 */
25 SkPDFIndirectReference SkPDFMakeFormXObject(SkPDFDocument* doc,
26                                             std::unique_ptr<SkStreamAsset> content,
27                                             std::unique_ptr<SkPDFArray> mediaBox,
28                                             std::unique_ptr<SkPDFDict> resourceDict,
29                                             const SkMatrix& inverseTransform,
30                                             const char* colorSpace);
31 #endif
32