Flutter Engine
The Flutter Engine
SkPDFResourceDict.h
Go to the documentation of this file.
1/*
2 * Copyright 2013 Google Inc.
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#ifndef SkPDFResourceDict_DEFINED
9#define SkPDFResourceDict_DEFINED
10
11#include <memory>
12#include <vector>
13
14class SkPDFDict;
15class SkWStream;
17
19 kExtGState = 0,
20 kPattern = 1,
21 kXObject = 2,
22 kFont = 3,
23 // These additional types are defined by the spec, but not
24 // currently used by Skia: ColorSpace, Shading, Properties
25};
26
27
28/** Create a PDF resource dictionary.
29 * The full set of ProcSet entries is automatically created for backwards
30 * compatibility, as recommended by the PDF spec.
31 *
32 * Any arguments can be nullptr.
33 */
34std::unique_ptr<SkPDFDict> SkPDFMakeResourceDict(
35 const std::vector<SkPDFIndirectReference>& graphicStateResources,
36 const std::vector<SkPDFIndirectReference>& shaderResources,
37 const std::vector<SkPDFIndirectReference>& xObjectResources,
38 const std::vector<SkPDFIndirectReference>& fontResources);
39
40/**
41 * Writes the name for the resource that will be generated by the resource
42 * dict.
43 *
44 * @param type The type of resource being entered
45 * @param key The resource key, should be unique within its type.
46 */
48
49#endif
SkPDFResourceType
std::unique_ptr< SkPDFDict > SkPDFMakeResourceDict(const std::vector< SkPDFIndirectReference > &graphicStateResources, const std::vector< SkPDFIndirectReference > &shaderResources, const std::vector< SkPDFIndirectReference > &xObjectResources, const std::vector< SkPDFIndirectReference > &fontResources)
void SkPDFWriteResourceName(SkWStream *, SkPDFResourceType type, int key)
GLenum type