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 SkPdfImageDictionary_DEFINED
9#define SkPdfImageDictionary_DEFINED
10
11#include "SkPdfXObjectDictionary_autogen.h"
12
13// Additional entries specific to an image dictionary
14class SkPdfImageDictionary : public SkPdfXObjectDictionary {
15public:
16public:
17   SkPdfImageDictionary* asImageDictionary() {return this;}
18   const SkPdfImageDictionary* asImageDictionary() const {return this;}
19
20private:
21   SkPdfType1FormDictionary* asType1FormDictionary() {return (SkPdfType1FormDictionary*)this;}
22   const SkPdfType1FormDictionary* asType1FormDictionary() const {return (const SkPdfType1FormDictionary*)this;}
23
24public:
25   bool valid() const {return true;}
26  SkString Type(SkPdfNativeDoc* doc);
27  bool has_Type() const;
28  SkString Subtype(SkPdfNativeDoc* doc);
29  bool has_Subtype() const;
30  int64_t Width(SkPdfNativeDoc* doc);
31  bool has_Width() const;
32  int64_t Height(SkPdfNativeDoc* doc);
33  bool has_Height() const;
34
35  bool isColorSpaceAName(SkPdfNativeDoc* doc);
36  SkString getColorSpaceAsName(SkPdfNativeDoc* doc);
37
38  bool isColorSpaceAArray(SkPdfNativeDoc* doc);
39  SkPdfArray* getColorSpaceAsArray(SkPdfNativeDoc* doc);
40  bool has_ColorSpace() const;
41  int64_t BitsPerComponent(SkPdfNativeDoc* doc);
42  bool has_BitsPerComponent() const;
43  SkString Intent(SkPdfNativeDoc* doc);
44  bool has_Intent() const;
45  bool ImageMask(SkPdfNativeDoc* doc);
46  bool has_ImageMask() const;
47
48  bool isMaskAStream(SkPdfNativeDoc* doc);
49  SkPdfStream* getMaskAsStream(SkPdfNativeDoc* doc);
50
51  bool isMaskAArray(SkPdfNativeDoc* doc);
52  SkPdfArray* getMaskAsArray(SkPdfNativeDoc* doc);
53  bool has_Mask() const;
54  SkPdfImageDictionary* SMask(SkPdfNativeDoc* doc);
55  bool has_SMask() const;
56  SkPdfArray* Decode(SkPdfNativeDoc* doc);
57  bool has_Decode() const;
58  bool Interpolate(SkPdfNativeDoc* doc);
59  bool has_Interpolate() const;
60  SkPdfArray* Alternates(SkPdfNativeDoc* doc);
61  bool has_Alternates() const;
62  SkString Name(SkPdfNativeDoc* doc);
63  bool has_Name() const;
64  int64_t StructParent(SkPdfNativeDoc* doc);
65  bool has_StructParent() const;
66  SkString ID(SkPdfNativeDoc* doc);
67  bool has_ID() const;
68  SkPdfDictionary* OPI(SkPdfNativeDoc* doc);
69  bool has_OPI() const;
70  SkPdfStream* Metadata(SkPdfNativeDoc* doc);
71  bool has_Metadata() const;
72};
73
74#endif  // SkPdfImageDictionary_DEFINED
75