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 #include "SkPdfPrinterMarkFormDictionary_autogen.h" 9 #include "SkPdfNativeDoc.h" 10 MarkStyle(SkPdfNativeDoc * doc)11SkString SkPdfPrinterMarkFormDictionary::MarkStyle(SkPdfNativeDoc* doc) { 12 SkPdfNativeObject* ret = get("MarkStyle", ""); 13 if (doc) {ret = doc->resolveReference(ret);} 14 if ((ret != NULL && ret->isAnyString()) || (doc == NULL && ret != NULL && ret->isReference())) return ret->stringValue2(); 15 // TODO(edisonn): warn about missing default value for optional fields 16 return SkString(); 17 } 18 has_MarkStyle() const19bool SkPdfPrinterMarkFormDictionary::has_MarkStyle() const { 20 return get("MarkStyle", "") != NULL; 21 } 22 Colorants(SkPdfNativeDoc * doc)23SkPdfDictionary* SkPdfPrinterMarkFormDictionary::Colorants(SkPdfNativeDoc* doc) { 24 SkPdfNativeObject* ret = get("Colorants", ""); 25 if (doc) {ret = doc->resolveReference(ret);} 26 if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret->isReference())) return (SkPdfDictionary*)ret; 27 // TODO(edisonn): warn about missing default value for optional fields 28 return NULL; 29 } 30 has_Colorants() const31bool SkPdfPrinterMarkFormDictionary::has_Colorants() const { 32 return get("Colorants", "") != NULL; 33 } 34