aboutsummaryrefslogtreecommitdiffhomepage
path: root/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfType3ShadingDictionary_autogen.cpp
blob: 129b9a9b248fc9be89cca9ad06a6894d52253166 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/*
 * Copyright 2013 Google Inc.

 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#include "SkPdfType3ShadingDictionary_autogen.h"
#include "SkPdfNativeDoc.h"

SkPdfArray* SkPdfType3ShadingDictionary::Coords(SkPdfNativeDoc* doc) {
  SkPdfNativeObject* ret = get("Coords", "");
  if (doc) {ret = doc->resolveReference(ret);}
  if ((ret != NULL && ret->isArray()) || (doc == NULL && ret != NULL && ret->isReference())) return (SkPdfArray*)ret;
  // TODO(edisonn): warn about missing required field, assert for known good pdfs
  return NULL;
}

bool SkPdfType3ShadingDictionary::has_Coords() const {
  return get("Coords", "") != NULL;
}

SkPdfArray* SkPdfType3ShadingDictionary::Domain(SkPdfNativeDoc* doc) {
  SkPdfNativeObject* ret = get("Domain", "");
  if (doc) {ret = doc->resolveReference(ret);}
  if ((ret != NULL && ret->isArray()) || (doc == NULL && ret != NULL && ret->isReference())) return (SkPdfArray*)ret;
  // TODO(edisonn): warn about missing default value for optional fields
  return NULL;
}

bool SkPdfType3ShadingDictionary::has_Domain() const {
  return get("Domain", "") != NULL;
}

SkPdfFunction SkPdfType3ShadingDictionary::Function(SkPdfNativeDoc* doc) {
  SkPdfNativeObject* ret = get("Function", "");
  if (doc) {ret = doc->resolveReference(ret);}
  if ((ret != NULL && ret->isFunction()) || (doc == NULL && ret != NULL && ret->isReference())) return ret->functionValue();
  // TODO(edisonn): warn about missing required field, assert for known good pdfs
  return SkPdfFunction();
}

bool SkPdfType3ShadingDictionary::has_Function() const {
  return get("Function", "") != NULL;
}

SkPdfArray* SkPdfType3ShadingDictionary::Extend(SkPdfNativeDoc* doc) {
  SkPdfNativeObject* ret = get("Extend", "");
  if (doc) {ret = doc->resolveReference(ret);}
  if ((ret != NULL && ret->isArray()) || (doc == NULL && ret != NULL && ret->isReference())) return (SkPdfArray*)ret;
  // TODO(edisonn): warn about missing default value for optional fields
  return NULL;
}

bool SkPdfType3ShadingDictionary::has_Extend() const {
  return get("Extend", "") != NULL;
}