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 SkPdfType5ShadingDictionary_DEFINED 9#define SkPdfType5ShadingDictionary_DEFINED 10 11#include "SkPdfShadingDictionary_autogen.h" 12 13// Additional entries specific to a type 5 shading dictionary 14class SkPdfType5ShadingDictionary : public SkPdfShadingDictionary { 15public: 16public: 17 SkPdfType5ShadingDictionary* asType5ShadingDictionary() {return this;} 18 const SkPdfType5ShadingDictionary* asType5ShadingDictionary() const {return this;} 19 20private: 21 SkPdfType1ShadingDictionary* asType1ShadingDictionary() {return (SkPdfType1ShadingDictionary*)this;} 22 const SkPdfType1ShadingDictionary* asType1ShadingDictionary() const {return (const SkPdfType1ShadingDictionary*)this;} 23 24 SkPdfType2ShadingDictionary* asType2ShadingDictionary() {return (SkPdfType2ShadingDictionary*)this;} 25 const SkPdfType2ShadingDictionary* asType2ShadingDictionary() const {return (const SkPdfType2ShadingDictionary*)this;} 26 27 SkPdfType3ShadingDictionary* asType3ShadingDictionary() {return (SkPdfType3ShadingDictionary*)this;} 28 const SkPdfType3ShadingDictionary* asType3ShadingDictionary() const {return (const SkPdfType3ShadingDictionary*)this;} 29 30 SkPdfType4ShadingDictionary* asType4ShadingDictionary() {return (SkPdfType4ShadingDictionary*)this;} 31 const SkPdfType4ShadingDictionary* asType4ShadingDictionary() const {return (const SkPdfType4ShadingDictionary*)this;} 32 33 SkPdfType6ShadingDictionary* asType6ShadingDictionary() {return (SkPdfType6ShadingDictionary*)this;} 34 const SkPdfType6ShadingDictionary* asType6ShadingDictionary() const {return (const SkPdfType6ShadingDictionary*)this;} 35 36public: 37 bool valid() const {return true;} 38 int64_t BitsPerCoordinate(SkPdfNativeDoc* doc); 39 bool has_BitsPerCoordinate() const; 40 int64_t BitsPerComponent(SkPdfNativeDoc* doc); 41 bool has_BitsPerComponent() const; 42 int64_t VerticesPerRow(SkPdfNativeDoc* doc); 43 bool has_VerticesPerRow() const; 44 SkPdfArray* Decode(SkPdfNativeDoc* doc); 45 bool has_Decode() const; 46 SkPdfFunction Function(SkPdfNativeDoc* doc); 47 bool has_Function() const; 48}; 49 50#endif // SkPdfType5ShadingDictionary_DEFINED 51