Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Side by Side Diff: experimental/PdfViewer/SkPdfGraphicsStateDictionary_autogen.h

Issue 17748002: Basic support for Type3 Fonts in Pdf + various refactorings (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 #ifndef __DEFINED__SkPdfGraphicsStateDictionary
2 #define __DEFINED__SkPdfGraphicsStateDictionary
3
4 #include "SkPdfEnums_autogen.h"
5 #include "SkPdfArray_autogen.h"
6 #include "SkPdfDictionary_autogen.h"
7
8 // Entries in a graphics state parameter dictionary
9 class SkPdfGraphicsStateDictionary : public SkPdfDictionary {
10 public:
11 virtual SkPdfObjectType getType() const { return kGraphicsStateDictionary_SkPd fObjectType;}
12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kGraphic sStateDictionary_SkPdfObjectType + 1);}
13 public:
14 virtual SkPdfGraphicsStateDictionary* asGraphicsStateDictionary() {return this ;}
15 virtual const SkPdfGraphicsStateDictionary* asGraphicsStateDictionary() const {return this;}
16
17 private:
18 virtual SkPdfALinkAnnotationDictionary* asALinkAnnotationDictionary() {return NULL;}
19 virtual const SkPdfALinkAnnotationDictionary* asALinkAnnotationDictionary() co nst {return NULL;}
20
21 virtual SkPdfActionDictionary* asActionDictionary() {return NULL;}
22 virtual const SkPdfActionDictionary* asActionDictionary() const {return NULL;}
23
24 virtual SkPdfAlternateImageDictionary* asAlternateImageDictionary() {return NU LL;}
25 virtual const SkPdfAlternateImageDictionary* asAlternateImageDictionary() cons t {return NULL;}
26
27 virtual SkPdfAnnotationActionsDictionary* asAnnotationActionsDictionary() {ret urn NULL;}
28 virtual const SkPdfAnnotationActionsDictionary* asAnnotationActionsDictionary( ) const {return NULL;}
29
30 virtual SkPdfAnnotationDictionary* asAnnotationDictionary() {return NULL;}
31 virtual const SkPdfAnnotationDictionary* asAnnotationDictionary() const {retur n NULL;}
32
33 virtual SkPdfAppearanceCharacteristicsDictionary* asAppearanceCharacteristicsD ictionary() {return NULL;}
34 virtual const SkPdfAppearanceCharacteristicsDictionary* asAppearanceCharacteri sticsDictionary() const {return NULL;}
35
36 virtual SkPdfAppearanceDictionary* asAppearanceDictionary() {return NULL;}
37 virtual const SkPdfAppearanceDictionary* asAppearanceDictionary() const {retur n NULL;}
38
39 virtual SkPdfApplicationDataDictionary* asApplicationDataDictionary() {return NULL;}
40 virtual const SkPdfApplicationDataDictionary* asApplicationDataDictionary() co nst {return NULL;}
41
42 virtual SkPdfArtifactsDictionary* asArtifactsDictionary() {return NULL;}
43 virtual const SkPdfArtifactsDictionary* asArtifactsDictionary() const {return NULL;}
44
45 virtual SkPdfAttributeObjectDictionary* asAttributeObjectDictionary() {return NULL;}
46 virtual const SkPdfAttributeObjectDictionary* asAttributeObjectDictionary() co nst {return NULL;}
47
48 virtual SkPdfBeadDictionary* asBeadDictionary() {return NULL;}
49 virtual const SkPdfBeadDictionary* asBeadDictionary() const {return NULL;}
50
51 virtual SkPdfBlockLevelStructureElementsDictionary* asBlockLevelStructureEleme ntsDictionary() {return NULL;}
52 virtual const SkPdfBlockLevelStructureElementsDictionary* asBlockLevelStructur eElementsDictionary() const {return NULL;}
53
54 virtual SkPdfBorderStyleDictionary* asBorderStyleDictionary() {return NULL;}
55 virtual const SkPdfBorderStyleDictionary* asBorderStyleDictionary() const {ret urn NULL;}
56
57 virtual SkPdfBoxColorInformationDictionary* asBoxColorInformationDictionary() {return NULL;}
58 virtual const SkPdfBoxColorInformationDictionary* asBoxColorInformationDiction ary() const {return NULL;}
59
60 virtual SkPdfBoxStyleDictionary* asBoxStyleDictionary() {return NULL;}
61 virtual const SkPdfBoxStyleDictionary* asBoxStyleDictionary() const {return NU LL;}
62
63 virtual SkPdfCIDFontDescriptorDictionary* asCIDFontDescriptorDictionary() {ret urn NULL;}
64 virtual const SkPdfCIDFontDescriptorDictionary* asCIDFontDescriptorDictionary( ) const {return NULL;}
65
66 virtual SkPdfCIDSystemInfoDictionary* asCIDSystemInfoDictionary() {return NULL ;}
67 virtual const SkPdfCIDSystemInfoDictionary* asCIDSystemInfoDictionary() const {return NULL;}
68
69 virtual SkPdfCMapDictionary* asCMapDictionary() {return NULL;}
70 virtual const SkPdfCMapDictionary* asCMapDictionary() const {return NULL;}
71
72 virtual SkPdfCalgrayColorSpaceDictionary* asCalgrayColorSpaceDictionary() {ret urn NULL;}
73 virtual const SkPdfCalgrayColorSpaceDictionary* asCalgrayColorSpaceDictionary( ) const {return NULL;}
74
75 virtual SkPdfCalrgbColorSpaceDictionary* asCalrgbColorSpaceDictionary() {retur n NULL;}
76 virtual const SkPdfCalrgbColorSpaceDictionary* asCalrgbColorSpaceDictionary() const {return NULL;}
77
78 virtual SkPdfCatalogDictionary* asCatalogDictionary() {return NULL;}
79 virtual const SkPdfCatalogDictionary* asCatalogDictionary() const {return NULL ;}
80
81 virtual SkPdfCcittfaxdecodeFilterDictionary* asCcittfaxdecodeFilterDictionary( ) {return NULL;}
82 virtual const SkPdfCcittfaxdecodeFilterDictionary* asCcittfaxdecodeFilterDicti onary() const {return NULL;}
83
84 virtual SkPdfCheckboxFieldDictionary* asCheckboxFieldDictionary() {return NULL ;}
85 virtual const SkPdfCheckboxFieldDictionary* asCheckboxFieldDictionary() const {return NULL;}
86
87 virtual SkPdfChoiceFieldDictionary* asChoiceFieldDictionary() {return NULL;}
88 virtual const SkPdfChoiceFieldDictionary* asChoiceFieldDictionary() const {ret urn NULL;}
89
90 virtual SkPdfComponentsWithMetadataDictionary* asComponentsWithMetadataDiction ary() {return NULL;}
91 virtual const SkPdfComponentsWithMetadataDictionary* asComponentsWithMetadataD ictionary() const {return NULL;}
92
93 virtual SkPdfDctdecodeFilterDictionary* asDctdecodeFilterDictionary() {return NULL;}
94 virtual const SkPdfDctdecodeFilterDictionary* asDctdecodeFilterDictionary() co nst {return NULL;}
95
96 virtual SkPdfDeviceNColorSpaceDictionary* asDeviceNColorSpaceDictionary() {ret urn NULL;}
97 virtual const SkPdfDeviceNColorSpaceDictionary* asDeviceNColorSpaceDictionary( ) const {return NULL;}
98
99 virtual SkPdfDocumentCatalogActionsDictionary* asDocumentCatalogActionsDiction ary() {return NULL;}
100 virtual const SkPdfDocumentCatalogActionsDictionary* asDocumentCatalogActionsD ictionary() const {return NULL;}
101
102 virtual SkPdfDocumentInformationDictionary* asDocumentInformationDictionary() {return NULL;}
103 virtual const SkPdfDocumentInformationDictionary* asDocumentInformationDiction ary() const {return NULL;}
104
105 virtual SkPdfEmbeddedFileParameterDictionary* asEmbeddedFileParameterDictionar y() {return NULL;}
106 virtual const SkPdfEmbeddedFileParameterDictionary* asEmbeddedFileParameterDic tionary() const {return NULL;}
107
108 virtual SkPdfEmbeddedFileStreamDictionary* asEmbeddedFileStreamDictionary() {r eturn NULL;}
109 virtual const SkPdfEmbeddedFileStreamDictionary* asEmbeddedFileStreamDictionar y() const {return NULL;}
110
111 virtual SkPdfEmbeddedFontStreamDictionary* asEmbeddedFontStreamDictionary() {r eturn NULL;}
112 virtual const SkPdfEmbeddedFontStreamDictionary* asEmbeddedFontStreamDictionar y() const {return NULL;}
113
114 virtual SkPdfEncodingDictionary* asEncodingDictionary() {return NULL;}
115 virtual const SkPdfEncodingDictionary* asEncodingDictionary() const {return NU LL;}
116
117 virtual SkPdfEncryptedEmbeddedFileStreamDictionary* asEncryptedEmbeddedFileStr eamDictionary() {return NULL;}
118 virtual const SkPdfEncryptedEmbeddedFileStreamDictionary* asEncryptedEmbeddedF ileStreamDictionary() const {return NULL;}
119
120 virtual SkPdfEncryptionCommonDictionary* asEncryptionCommonDictionary() {retur n NULL;}
121 virtual const SkPdfEncryptionCommonDictionary* asEncryptionCommonDictionary() const {return NULL;}
122
123 virtual SkPdfFDFCatalogDictionary* asFDFCatalogDictionary() {return NULL;}
124 virtual const SkPdfFDFCatalogDictionary* asFDFCatalogDictionary() const {retur n NULL;}
125
126 virtual SkPdfFDFDictionary* asFDFDictionary() {return NULL;}
127 virtual const SkPdfFDFDictionary* asFDFDictionary() const {return NULL;}
128
129 virtual SkPdfFDFFieldDictionary* asFDFFieldDictionary() {return NULL;}
130 virtual const SkPdfFDFFieldDictionary* asFDFFieldDictionary() const {return NU LL;}
131
132 virtual SkPdfFDFFileAnnotationDictionary* asFDFFileAnnotationDictionary() {ret urn NULL;}
133 virtual const SkPdfFDFFileAnnotationDictionary* asFDFFileAnnotationDictionary( ) const {return NULL;}
134
135 virtual SkPdfFDFNamedPageReferenceDictionary* asFDFNamedPageReferenceDictionar y() {return NULL;}
136 virtual const SkPdfFDFNamedPageReferenceDictionary* asFDFNamedPageReferenceDic tionary() const {return NULL;}
137
138 virtual SkPdfFDFPageDictionary* asFDFPageDictionary() {return NULL;}
139 virtual const SkPdfFDFPageDictionary* asFDFPageDictionary() const {return NULL ;}
140
141 virtual SkPdfFDFTemplateDictionary* asFDFTemplateDictionary() {return NULL;}
142 virtual const SkPdfFDFTemplateDictionary* asFDFTemplateDictionary() const {ret urn NULL;}
143
144 virtual SkPdfFDFTrailerDictionary* asFDFTrailerDictionary() {return NULL;}
145 virtual const SkPdfFDFTrailerDictionary* asFDFTrailerDictionary() const {retur n NULL;}
146
147 virtual SkPdfFieldDictionary* asFieldDictionary() {return NULL;}
148 virtual const SkPdfFieldDictionary* asFieldDictionary() const {return NULL;}
149
150 virtual SkPdfFileAttachmentAnnotationDictionary* asFileAttachmentAnnotationDic tionary() {return NULL;}
151 virtual const SkPdfFileAttachmentAnnotationDictionary* asFileAttachmentAnnotat ionDictionary() const {return NULL;}
152
153 virtual SkPdfFileSpecificationDictionary* asFileSpecificationDictionary() {ret urn NULL;}
154 virtual const SkPdfFileSpecificationDictionary* asFileSpecificationDictionary( ) const {return NULL;}
155
156 virtual SkPdfFileTrailerDictionary* asFileTrailerDictionary() {return NULL;}
157 virtual const SkPdfFileTrailerDictionary* asFileTrailerDictionary() const {ret urn NULL;}
158
159 virtual SkPdfFontDescriptorDictionary* asFontDescriptorDictionary() {return NU LL;}
160 virtual const SkPdfFontDescriptorDictionary* asFontDescriptorDictionary() cons t {return NULL;}
161
162 virtual SkPdfFontDictionary* asFontDictionary() {return NULL;}
163 virtual const SkPdfFontDictionary* asFontDictionary() const {return NULL;}
164
165 virtual SkPdfCIDFontDictionary* asCIDFontDictionary() {return NULL;}
166 virtual const SkPdfCIDFontDictionary* asCIDFontDictionary() const {return NULL ;}
167
168 virtual SkPdfType0FontDictionary* asType0FontDictionary() {return NULL;}
169 virtual const SkPdfType0FontDictionary* asType0FontDictionary() const {return NULL;}
170
171 virtual SkPdfType3FontDictionary* asType3FontDictionary() {return NULL;}
172 virtual const SkPdfType3FontDictionary* asType3FontDictionary() const {return NULL;}
173
174 virtual SkPdfType1FontDictionary* asType1FontDictionary() {return NULL;}
175 virtual const SkPdfType1FontDictionary* asType1FontDictionary() const {return NULL;}
176
177 virtual SkPdfMultiMasterFontDictionary* asMultiMasterFontDictionary() {return NULL;}
178 virtual const SkPdfMultiMasterFontDictionary* asMultiMasterFontDictionary() co nst {return NULL;}
179
180 virtual SkPdfTrueTypeFontDictionary* asTrueTypeFontDictionary() {return NULL;}
181 virtual const SkPdfTrueTypeFontDictionary* asTrueTypeFontDictionary() const {r eturn NULL;}
182
183 virtual SkPdfFormFieldActionsDictionary* asFormFieldActionsDictionary() {retur n NULL;}
184 virtual const SkPdfFormFieldActionsDictionary* asFormFieldActionsDictionary() const {return NULL;}
185
186 virtual SkPdfFreeTextAnnotationDictionary* asFreeTextAnnotationDictionary() {r eturn NULL;}
187 virtual const SkPdfFreeTextAnnotationDictionary* asFreeTextAnnotationDictionar y() const {return NULL;}
188
189 virtual SkPdfFunctionCommonDictionary* asFunctionCommonDictionary() {return NU LL;}
190 virtual const SkPdfFunctionCommonDictionary* asFunctionCommonDictionary() cons t {return NULL;}
191
192 virtual SkPdfGoToActionDictionary* asGoToActionDictionary() {return NULL;}
193 virtual const SkPdfGoToActionDictionary* asGoToActionDictionary() const {retur n NULL;}
194
195 virtual SkPdfGroupAttributesDictionary* asGroupAttributesDictionary() {return NULL;}
196 virtual const SkPdfGroupAttributesDictionary* asGroupAttributesDictionary() co nst {return NULL;}
197
198 virtual SkPdfHideActionDictionary* asHideActionDictionary() {return NULL;}
199 virtual const SkPdfHideActionDictionary* asHideActionDictionary() const {retur n NULL;}
200
201 virtual SkPdfIccProfileStreamDictionary* asIccProfileStreamDictionary() {retur n NULL;}
202 virtual const SkPdfIccProfileStreamDictionary* asIccProfileStreamDictionary() const {return NULL;}
203
204 virtual SkPdfIconFitDictionary* asIconFitDictionary() {return NULL;}
205 virtual const SkPdfIconFitDictionary* asIconFitDictionary() const {return NULL ;}
206
207 virtual SkPdfImportDataActionDictionary* asImportDataActionDictionary() {retur n NULL;}
208 virtual const SkPdfImportDataActionDictionary* asImportDataActionDictionary() const {return NULL;}
209
210 virtual SkPdfInkAnnotationDictionary* asInkAnnotationDictionary() {return NULL ;}
211 virtual const SkPdfInkAnnotationDictionary* asInkAnnotationDictionary() const {return NULL;}
212
213 virtual SkPdfInlineLevelStructureElementsDictionary* asInlineLevelStructureEle mentsDictionary() {return NULL;}
214 virtual const SkPdfInlineLevelStructureElementsDictionary* asInlineLevelStruct ureElementsDictionary() const {return NULL;}
215
216 virtual SkPdfInteractiveFormDictionary* asInteractiveFormDictionary() {return NULL;}
217 virtual const SkPdfInteractiveFormDictionary* asInteractiveFormDictionary() co nst {return NULL;}
218
219 virtual SkPdfJavascriptActionDictionary* asJavascriptActionDictionary() {retur n NULL;}
220 virtual const SkPdfJavascriptActionDictionary* asJavascriptActionDictionary() const {return NULL;}
221
222 virtual SkPdfJavascriptDictionary* asJavascriptDictionary() {return NULL;}
223 virtual const SkPdfJavascriptDictionary* asJavascriptDictionary() const {retur n NULL;}
224
225 virtual SkPdfJbig2DecodeFilterDictionary* asJbig2DecodeFilterDictionary() {ret urn NULL;}
226 virtual const SkPdfJbig2DecodeFilterDictionary* asJbig2DecodeFilterDictionary( ) const {return NULL;}
227
228 virtual SkPdfLabColorSpaceDictionary* asLabColorSpaceDictionary() {return NULL ;}
229 virtual const SkPdfLabColorSpaceDictionary* asLabColorSpaceDictionary() const {return NULL;}
230
231 virtual SkPdfLaunchActionDictionary* asLaunchActionDictionary() {return NULL;}
232 virtual const SkPdfLaunchActionDictionary* asLaunchActionDictionary() const {r eturn NULL;}
233
234 virtual SkPdfLineAnnotationDictionary* asLineAnnotationDictionary() {return NU LL;}
235 virtual const SkPdfLineAnnotationDictionary* asLineAnnotationDictionary() cons t {return NULL;}
236
237 virtual SkPdfListAttributeDictionary* asListAttributeDictionary() {return NULL ;}
238 virtual const SkPdfListAttributeDictionary* asListAttributeDictionary() const {return NULL;}
239
240 virtual SkPdfLzwdecodeAndFlatedecodeFiltersDictionary* asLzwdecodeAndFlatedeco deFiltersDictionary() {return NULL;}
241 virtual const SkPdfLzwdecodeAndFlatedecodeFiltersDictionary* asLzwdecodeAndFla tedecodeFiltersDictionary() const {return NULL;}
242
243 virtual SkPdfMacOsFileInformationDictionary* asMacOsFileInformationDictionary( ) {return NULL;}
244 virtual const SkPdfMacOsFileInformationDictionary* asMacOsFileInformationDicti onary() const {return NULL;}
245
246 virtual SkPdfMarkInformationDictionary* asMarkInformationDictionary() {return NULL;}
247 virtual const SkPdfMarkInformationDictionary* asMarkInformationDictionary() co nst {return NULL;}
248
249 virtual SkPdfMarkedContentReferenceDictionary* asMarkedContentReferenceDiction ary() {return NULL;}
250 virtual const SkPdfMarkedContentReferenceDictionary* asMarkedContentReferenceD ictionary() const {return NULL;}
251
252 virtual SkPdfMarkupAnnotationsDictionary* asMarkupAnnotationsDictionary() {ret urn NULL;}
253 virtual const SkPdfMarkupAnnotationsDictionary* asMarkupAnnotationsDictionary( ) const {return NULL;}
254
255 virtual SkPdfMetadataStreamDictionary* asMetadataStreamDictionary() {return NU LL;}
256 virtual const SkPdfMetadataStreamDictionary* asMetadataStreamDictionary() cons t {return NULL;}
257
258 virtual SkPdfMovieActionDictionary* asMovieActionDictionary() {return NULL;}
259 virtual const SkPdfMovieActionDictionary* asMovieActionDictionary() const {ret urn NULL;}
260
261 virtual SkPdfMovieActivationDictionary* asMovieActivationDictionary() {return NULL;}
262 virtual const SkPdfMovieActivationDictionary* asMovieActivationDictionary() co nst {return NULL;}
263
264 virtual SkPdfMovieAnnotationDictionary* asMovieAnnotationDictionary() {return NULL;}
265 virtual const SkPdfMovieAnnotationDictionary* asMovieAnnotationDictionary() co nst {return NULL;}
266
267 virtual SkPdfMovieDictionary* asMovieDictionary() {return NULL;}
268 virtual const SkPdfMovieDictionary* asMovieDictionary() const {return NULL;}
269
270 virtual SkPdfNameDictionary* asNameDictionary() {return NULL;}
271 virtual const SkPdfNameDictionary* asNameDictionary() const {return NULL;}
272
273 virtual SkPdfNameTreeNodeDictionary* asNameTreeNodeDictionary() {return NULL;}
274 virtual const SkPdfNameTreeNodeDictionary* asNameTreeNodeDictionary() const {r eturn NULL;}
275
276 virtual SkPdfNamedActionsDictionary* asNamedActionsDictionary() {return NULL;}
277 virtual const SkPdfNamedActionsDictionary* asNamedActionsDictionary() const {r eturn NULL;}
278
279 virtual SkPdfNumberTreeNodeDictionary* asNumberTreeNodeDictionary() {return NU LL;}
280 virtual const SkPdfNumberTreeNodeDictionary* asNumberTreeNodeDictionary() cons t {return NULL;}
281
282 virtual SkPdfObjectReferenceDictionary* asObjectReferenceDictionary() {return NULL;}
283 virtual const SkPdfObjectReferenceDictionary* asObjectReferenceDictionary() co nst {return NULL;}
284
285 virtual SkPdfOpiVersionDictionary* asOpiVersionDictionary() {return NULL;}
286 virtual const SkPdfOpiVersionDictionary* asOpiVersionDictionary() const {retur n NULL;}
287
288 virtual SkPdfOutlineDictionary* asOutlineDictionary() {return NULL;}
289 virtual const SkPdfOutlineDictionary* asOutlineDictionary() const {return NULL ;}
290
291 virtual SkPdfOutlineItemDictionary* asOutlineItemDictionary() {return NULL;}
292 virtual const SkPdfOutlineItemDictionary* asOutlineItemDictionary() const {ret urn NULL;}
293
294 virtual SkPdfPDF_XOutputIntentDictionary* asPDF_XOutputIntentDictionary() {ret urn NULL;}
295 virtual const SkPdfPDF_XOutputIntentDictionary* asPDF_XOutputIntentDictionary( ) const {return NULL;}
296
297 virtual SkPdfPSXobjectDictionary* asPSXobjectDictionary() {return NULL;}
298 virtual const SkPdfPSXobjectDictionary* asPSXobjectDictionary() const {return NULL;}
299
300 virtual SkPdfPageLabelDictionary* asPageLabelDictionary() {return NULL;}
301 virtual const SkPdfPageLabelDictionary* asPageLabelDictionary() const {return NULL;}
302
303 virtual SkPdfPageObjectActionsDictionary* asPageObjectActionsDictionary() {ret urn NULL;}
304 virtual const SkPdfPageObjectActionsDictionary* asPageObjectActionsDictionary( ) const {return NULL;}
305
306 virtual SkPdfPageObjectDictionary* asPageObjectDictionary() {return NULL;}
307 virtual const SkPdfPageObjectDictionary* asPageObjectDictionary() const {retur n NULL;}
308
309 virtual SkPdfPagePieceDictionary* asPagePieceDictionary() {return NULL;}
310 virtual const SkPdfPagePieceDictionary* asPagePieceDictionary() const {return NULL;}
311
312 virtual SkPdfPageTreeNodeDictionary* asPageTreeNodeDictionary() {return NULL;}
313 virtual const SkPdfPageTreeNodeDictionary* asPageTreeNodeDictionary() const {r eturn NULL;}
314
315 virtual SkPdfPopUpAnnotationDictionary* asPopUpAnnotationDictionary() {return NULL;}
316 virtual const SkPdfPopUpAnnotationDictionary* asPopUpAnnotationDictionary() co nst {return NULL;}
317
318 virtual SkPdfPrinterMarkAnnotationDictionary* asPrinterMarkAnnotationDictionar y() {return NULL;}
319 virtual const SkPdfPrinterMarkAnnotationDictionary* asPrinterMarkAnnotationDic tionary() const {return NULL;}
320
321 virtual SkPdfPrinterMarkFormDictionary* asPrinterMarkFormDictionary() {return NULL;}
322 virtual const SkPdfPrinterMarkFormDictionary* asPrinterMarkFormDictionary() co nst {return NULL;}
323
324 virtual SkPdfRadioButtonFieldDictionary* asRadioButtonFieldDictionary() {retur n NULL;}
325 virtual const SkPdfRadioButtonFieldDictionary* asRadioButtonFieldDictionary() const {return NULL;}
326
327 virtual SkPdfReferenceDictionary* asReferenceDictionary() {return NULL;}
328 virtual const SkPdfReferenceDictionary* asReferenceDictionary() const {return NULL;}
329
330 virtual SkPdfRemoteGoToActionDictionary* asRemoteGoToActionDictionary() {retur n NULL;}
331 virtual const SkPdfRemoteGoToActionDictionary* asRemoteGoToActionDictionary() const {return NULL;}
332
333 virtual SkPdfResetFormActionDictionary* asResetFormActionDictionary() {return NULL;}
334 virtual const SkPdfResetFormActionDictionary* asResetFormActionDictionary() co nst {return NULL;}
335
336 virtual SkPdfResourceDictionary* asResourceDictionary() {return NULL;}
337 virtual const SkPdfResourceDictionary* asResourceDictionary() const {return NU LL;}
338
339 virtual SkPdfRubberStampAnnotationDictionary* asRubberStampAnnotationDictionar y() {return NULL;}
340 virtual const SkPdfRubberStampAnnotationDictionary* asRubberStampAnnotationDic tionary() const {return NULL;}
341
342 virtual SkPdfSeparationDictionary* asSeparationDictionary() {return NULL;}
343 virtual const SkPdfSeparationDictionary* asSeparationDictionary() const {retur n NULL;}
344
345 virtual SkPdfShadingDictionary* asShadingDictionary() {return NULL;}
346 virtual const SkPdfShadingDictionary* asShadingDictionary() const {return NULL ;}
347
348 virtual SkPdfType1ShadingDictionary* asType1ShadingDictionary() {return NULL;}
349 virtual const SkPdfType1ShadingDictionary* asType1ShadingDictionary() const {r eturn NULL;}
350
351 virtual SkPdfType2ShadingDictionary* asType2ShadingDictionary() {return NULL;}
352 virtual const SkPdfType2ShadingDictionary* asType2ShadingDictionary() const {r eturn NULL;}
353
354 virtual SkPdfType3ShadingDictionary* asType3ShadingDictionary() {return NULL;}
355 virtual const SkPdfType3ShadingDictionary* asType3ShadingDictionary() const {r eturn NULL;}
356
357 virtual SkPdfType4ShadingDictionary* asType4ShadingDictionary() {return NULL;}
358 virtual const SkPdfType4ShadingDictionary* asType4ShadingDictionary() const {r eturn NULL;}
359
360 virtual SkPdfType5ShadingDictionary* asType5ShadingDictionary() {return NULL;}
361 virtual const SkPdfType5ShadingDictionary* asType5ShadingDictionary() const {r eturn NULL;}
362
363 virtual SkPdfType6ShadingDictionary* asType6ShadingDictionary() {return NULL;}
364 virtual const SkPdfType6ShadingDictionary* asType6ShadingDictionary() const {r eturn NULL;}
365
366 virtual SkPdfSignatureDictionary* asSignatureDictionary() {return NULL;}
367 virtual const SkPdfSignatureDictionary* asSignatureDictionary() const {return NULL;}
368
369 virtual SkPdfSoftMaskDictionary* asSoftMaskDictionary() {return NULL;}
370 virtual const SkPdfSoftMaskDictionary* asSoftMaskDictionary() const {return NU LL;}
371
372 virtual SkPdfSoftMaskImageDictionary* asSoftMaskImageDictionary() {return NULL ;}
373 virtual const SkPdfSoftMaskImageDictionary* asSoftMaskImageDictionary() const {return NULL;}
374
375 virtual SkPdfSoundActionDictionary* asSoundActionDictionary() {return NULL;}
376 virtual const SkPdfSoundActionDictionary* asSoundActionDictionary() const {ret urn NULL;}
377
378 virtual SkPdfSoundAnnotationDictionary* asSoundAnnotationDictionary() {return NULL;}
379 virtual const SkPdfSoundAnnotationDictionary* asSoundAnnotationDictionary() co nst {return NULL;}
380
381 virtual SkPdfSoundObjectDictionary* asSoundObjectDictionary() {return NULL;}
382 virtual const SkPdfSoundObjectDictionary* asSoundObjectDictionary() const {ret urn NULL;}
383
384 virtual SkPdfSourceInformationDictionary* asSourceInformationDictionary() {ret urn NULL;}
385 virtual const SkPdfSourceInformationDictionary* asSourceInformationDictionary( ) const {return NULL;}
386
387 virtual SkPdfSquareOrCircleAnnotation* asSquareOrCircleAnnotation() {return NU LL;}
388 virtual const SkPdfSquareOrCircleAnnotation* asSquareOrCircleAnnotation() cons t {return NULL;}
389
390 virtual SkPdfStandardSecurityHandlerDictionary* asStandardSecurityHandlerDicti onary() {return NULL;}
391 virtual const SkPdfStandardSecurityHandlerDictionary* asStandardSecurityHandle rDictionary() const {return NULL;}
392
393 virtual SkPdfStandardStructureDictionary* asStandardStructureDictionary() {ret urn NULL;}
394 virtual const SkPdfStandardStructureDictionary* asStandardStructureDictionary( ) const {return NULL;}
395
396 virtual SkPdfStreamCommonDictionary* asStreamCommonDictionary() {return NULL;}
397 virtual const SkPdfStreamCommonDictionary* asStreamCommonDictionary() const {r eturn NULL;}
398
399 virtual SkPdfStructureElementAccessDictionary* asStructureElementAccessDiction ary() {return NULL;}
400 virtual const SkPdfStructureElementAccessDictionary* asStructureElementAccessD ictionary() const {return NULL;}
401
402 virtual SkPdfStructureElementDictionary* asStructureElementDictionary() {retur n NULL;}
403 virtual const SkPdfStructureElementDictionary* asStructureElementDictionary() const {return NULL;}
404
405 virtual SkPdfStructureTreeRootDictionary* asStructureTreeRootDictionary() {ret urn NULL;}
406 virtual const SkPdfStructureTreeRootDictionary* asStructureTreeRootDictionary( ) const {return NULL;}
407
408 virtual SkPdfSubmitFormActionDictionary* asSubmitFormActionDictionary() {retur n NULL;}
409 virtual const SkPdfSubmitFormActionDictionary* asSubmitFormActionDictionary() const {return NULL;}
410
411 virtual SkPdfTableAttributesDictionary* asTableAttributesDictionary() {return NULL;}
412 virtual const SkPdfTableAttributesDictionary* asTableAttributesDictionary() co nst {return NULL;}
413
414 virtual SkPdfTextAnnotationDictionary* asTextAnnotationDictionary() {return NU LL;}
415 virtual const SkPdfTextAnnotationDictionary* asTextAnnotationDictionary() cons t {return NULL;}
416
417 virtual SkPdfTextFieldDictionary* asTextFieldDictionary() {return NULL;}
418 virtual const SkPdfTextFieldDictionary* asTextFieldDictionary() const {return NULL;}
419
420 virtual SkPdfThreadActionDictionary* asThreadActionDictionary() {return NULL;}
421 virtual const SkPdfThreadActionDictionary* asThreadActionDictionary() const {r eturn NULL;}
422
423 virtual SkPdfThreadDictionary* asThreadDictionary() {return NULL;}
424 virtual const SkPdfThreadDictionary* asThreadDictionary() const {return NULL;}
425
426 virtual SkPdfTransitionDictionary* asTransitionDictionary() {return NULL;}
427 virtual const SkPdfTransitionDictionary* asTransitionDictionary() const {retur n NULL;}
428
429 virtual SkPdfTransparencyGroupDictionary* asTransparencyGroupDictionary() {ret urn NULL;}
430 virtual const SkPdfTransparencyGroupDictionary* asTransparencyGroupDictionary( ) const {return NULL;}
431
432 virtual SkPdfTrapNetworkAnnotationDictionary* asTrapNetworkAnnotationDictionar y() {return NULL;}
433 virtual const SkPdfTrapNetworkAnnotationDictionary* asTrapNetworkAnnotationDic tionary() const {return NULL;}
434
435 virtual SkPdfTrapNetworkAppearanceStreamDictionary* asTrapNetworkAppearanceStr eamDictionary() {return NULL;}
436 virtual const SkPdfTrapNetworkAppearanceStreamDictionary* asTrapNetworkAppeara nceStreamDictionary() const {return NULL;}
437
438 virtual SkPdfType0FunctionDictionary* asType0FunctionDictionary() {return NULL ;}
439 virtual const SkPdfType0FunctionDictionary* asType0FunctionDictionary() const {return NULL;}
440
441 virtual SkPdfType10HalftoneDictionary* asType10HalftoneDictionary() {return NU LL;}
442 virtual const SkPdfType10HalftoneDictionary* asType10HalftoneDictionary() cons t {return NULL;}
443
444 virtual SkPdfType16HalftoneDictionary* asType16HalftoneDictionary() {return NU LL;}
445 virtual const SkPdfType16HalftoneDictionary* asType16HalftoneDictionary() cons t {return NULL;}
446
447 virtual SkPdfType1HalftoneDictionary* asType1HalftoneDictionary() {return NULL ;}
448 virtual const SkPdfType1HalftoneDictionary* asType1HalftoneDictionary() const {return NULL;}
449
450 virtual SkPdfType1PatternDictionary* asType1PatternDictionary() {return NULL;}
451 virtual const SkPdfType1PatternDictionary* asType1PatternDictionary() const {r eturn NULL;}
452
453 virtual SkPdfType2FunctionDictionary* asType2FunctionDictionary() {return NULL ;}
454 virtual const SkPdfType2FunctionDictionary* asType2FunctionDictionary() const {return NULL;}
455
456 virtual SkPdfType2PatternDictionary* asType2PatternDictionary() {return NULL;}
457 virtual const SkPdfType2PatternDictionary* asType2PatternDictionary() const {r eturn NULL;}
458
459 virtual SkPdfType3FunctionDictionary* asType3FunctionDictionary() {return NULL ;}
460 virtual const SkPdfType3FunctionDictionary* asType3FunctionDictionary() const {return NULL;}
461
462 virtual SkPdfType5HalftoneDictionary* asType5HalftoneDictionary() {return NULL ;}
463 virtual const SkPdfType5HalftoneDictionary* asType5HalftoneDictionary() const {return NULL;}
464
465 virtual SkPdfType6HalftoneDictionary* asType6HalftoneDictionary() {return NULL ;}
466 virtual const SkPdfType6HalftoneDictionary* asType6HalftoneDictionary() const {return NULL;}
467
468 virtual SkPdfURIActionDictionary* asURIActionDictionary() {return NULL;}
469 virtual const SkPdfURIActionDictionary* asURIActionDictionary() const {return NULL;}
470
471 virtual SkPdfURIDictionary* asURIDictionary() {return NULL;}
472 virtual const SkPdfURIDictionary* asURIDictionary() const {return NULL;}
473
474 virtual SkPdfURLAliasDictionary* asURLAliasDictionary() {return NULL;}
475 virtual const SkPdfURLAliasDictionary* asURLAliasDictionary() const {return NU LL;}
476
477 virtual SkPdfVariableTextFieldDictionary* asVariableTextFieldDictionary() {ret urn NULL;}
478 virtual const SkPdfVariableTextFieldDictionary* asVariableTextFieldDictionary( ) const {return NULL;}
479
480 virtual SkPdfViewerPreferencesDictionary* asViewerPreferencesDictionary() {ret urn NULL;}
481 virtual const SkPdfViewerPreferencesDictionary* asViewerPreferencesDictionary( ) const {return NULL;}
482
483 virtual SkPdfWebCaptureCommandDictionary* asWebCaptureCommandDictionary() {ret urn NULL;}
484 virtual const SkPdfWebCaptureCommandDictionary* asWebCaptureCommandDictionary( ) const {return NULL;}
485
486 virtual SkPdfWebCaptureCommandSettingsDictionary* asWebCaptureCommandSettingsD ictionary() {return NULL;}
487 virtual const SkPdfWebCaptureCommandSettingsDictionary* asWebCaptureCommandSet tingsDictionary() const {return NULL;}
488
489 virtual SkPdfWebCaptureDictionary* asWebCaptureDictionary() {return NULL;}
490 virtual const SkPdfWebCaptureDictionary* asWebCaptureDictionary() const {retur n NULL;}
491
492 virtual SkPdfWebCaptureImageSetDictionary* asWebCaptureImageSetDictionary() {r eturn NULL;}
493 virtual const SkPdfWebCaptureImageSetDictionary* asWebCaptureImageSetDictionar y() const {return NULL;}
494
495 virtual SkPdfWebCaptureInformationDictionary* asWebCaptureInformationDictionar y() {return NULL;}
496 virtual const SkPdfWebCaptureInformationDictionary* asWebCaptureInformationDic tionary() const {return NULL;}
497
498 virtual SkPdfWebCapturePageSetDictionary* asWebCapturePageSetDictionary() {ret urn NULL;}
499 virtual const SkPdfWebCapturePageSetDictionary* asWebCapturePageSetDictionary( ) const {return NULL;}
500
501 virtual SkPdfWidgetAnnotationDictionary* asWidgetAnnotationDictionary() {retur n NULL;}
502 virtual const SkPdfWidgetAnnotationDictionary* asWidgetAnnotationDictionary() const {return NULL;}
503
504 virtual SkPdfWindowsLaunchActionDictionary* asWindowsLaunchActionDictionary() {return NULL;}
505 virtual const SkPdfWindowsLaunchActionDictionary* asWindowsLaunchActionDiction ary() const {return NULL;}
506
507 virtual SkPdfXObjectDictionary* asXObjectDictionary() {return NULL;}
508 virtual const SkPdfXObjectDictionary* asXObjectDictionary() const {return NULL ;}
509
510 virtual SkPdfImageDictionary* asImageDictionary() {return NULL;}
511 virtual const SkPdfImageDictionary* asImageDictionary() const {return NULL;}
512
513 virtual SkPdfType1FormDictionary* asType1FormDictionary() {return NULL;}
514 virtual const SkPdfType1FormDictionary* asType1FormDictionary() const {return NULL;}
515
516 public:
517 private:
518 public:
519 SkPdfGraphicsStateDictionary(const PdfMemDocument* podofoDoc = NULL, const Pdf Object* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {}
520
521 virtual bool valid() const {return true;}
522
523 SkPdfGraphicsStateDictionary& operator=(const SkPdfGraphicsStateDictionary& fr om) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; ret urn *this;}
524
525 /** (Optional) The type of PDF object that this dictionary describes; must be
526 * ExtGState for a graphics state parameter dictionary.
527 **/
528 bool has_Type() const {
529 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type" , "", NULL));
530 }
531
532 std::string Type() const {
533 std::string ret;
534 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "", &ret)) return ret;
535 // TODO(edisonn): warn about missing required field, assert for known good p dfs
536 return "";
537 }
538
539 /** (Optional; PDF 1.3) The line width (see "Line Width" on page 152).
540 **/
541 bool has_LW() const {
542 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LW", "", NULL));
543 }
544
545 double LW() const {
546 double ret;
547 if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LW", "", &ret)) return ret;
548 // TODO(edisonn): warn about missing required field, assert for known good p dfs
549 return 0;
550 }
551
552 /** (Optional; PDF 1.3) The line cap style (see "Line Cap Style" on page 153).
553 **/
554 bool has_LC() const {
555 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LC", "", NULL));
556 }
557
558 long LC() const {
559 long ret;
560 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LC", "", &r et)) return ret;
561 // TODO(edisonn): warn about missing required field, assert for known good p dfs
562 return 0;
563 }
564
565 /** (Optional; PDF 1.3) The line join style (see "Line Join Style" on page 153).
566 **/
567 bool has_LJ() const {
568 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LJ", "", NULL));
569 }
570
571 long LJ() const {
572 long ret;
573 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "LJ", "", &r et)) return ret;
574 // TODO(edisonn): warn about missing required field, assert for known good p dfs
575 return 0;
576 }
577
578 /** (Optional; PDF 1.3) The miter limit (see "Miter Limit" on page 153).
579 **/
580 bool has_ML() const {
581 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ML", "", NULL));
582 }
583
584 double ML() const {
585 double ret;
586 if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ML", "", &ret)) return ret;
587 // TODO(edisonn): warn about missing required field, assert for known good p dfs
588 return 0;
589 }
590
591 /** (Optional; PDF 1.3) The line dash pattern, expressed as an array of the form
592 * [dashArray dashPhase], where dashArray is itself an array and dashPhase is a n
593 * integer (see "Line Dash Pattern" on page 155).
594 **/
595 bool has_D() const {
596 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", " ", NULL));
597 }
598
599 SkPdfArray D() const {
600 SkPdfArray ret;
601 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", &r et)) return ret;
602 // TODO(edisonn): warn about missing required field, assert for known good p dfs
603 return SkPdfArray();
604 }
605
606 /** (Optional; PDF 1.3) The name of the rendering intent (see "Rendering
607 * Intents" on page 197).
608 **/
609 bool has_RI() const {
610 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "RI", "", NULL));
611 }
612
613 std::string RI() const {
614 std::string ret;
615 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "RI", "", &r et)) return ret;
616 // TODO(edisonn): warn about missing required field, assert for known good p dfs
617 return "";
618 }
619
620 /** (Optional) A flag specifying whether to apply overprint (see Section 4.5.6,
621 * "Overprint Control"). In PDF 1.2 and earlier, there is a single overprint
622 * parameter that applies to all painting operations. Beginning with PDF 1.3,
623 * there are two separate overprint parameters: one for stroking and one for al l
624 * other painting operations. Specifying an OP entry sets both parameters un-
625 * less there is also an op entry in the same graphics state parameter dictiona ry,
626 * in which case the OP entry sets only the overprint parameter for stroking.
627 **/
628 bool has_OP() const {
629 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "OP", "", NULL));
630 }
631
632 bool OP() const {
633 bool ret;
634 if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "OP", "", &r et)) return ret;
635 // TODO(edisonn): warn about missing required field, assert for known good p dfs
636 return false;
637 }
638
639 /** (Optional; PDF 1.3) A flag specifying whether to apply overprint (see Sectio n
640 * 4.5.6, "Overprint Control") for painting operations other than stroking. If
641 * this entry is absent, the OP entry, if any, sets this parameter.
642 **/
643 bool has_op() const {
644 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "op", "", NULL));
645 }
646
647 bool op() const {
648 bool ret;
649 if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "op", "", &r et)) return ret;
650 // TODO(edisonn): warn about missing required field, assert for known good p dfs
651 return false;
652 }
653
654 /** (Optional; PDF 1.3) The overprint mode (see Section 4.5.6, "Overprint Con-
655 * trol").
656 **/
657 bool has_OPM() const {
658 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "OPM", "", NULL));
659 }
660
661 long OPM() const {
662 long ret;
663 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "OPM", "", & ret)) return ret;
664 // TODO(edisonn): warn about missing required field, assert for known good p dfs
665 return 0;
666 }
667
668 /** (Optional; PDF 1.3) An array of the form [font size], where font is an indir ect
669 * reference to a font dictionary and size is a number expressed in text space
670 * units. These two objects correspond to the operands of the Tf operator (see
671 * Section 5.2, "Text State Parameters and Operators"); however, the first oper -
672 * and is an indirect object reference instead of a resource name.
673 **/
674 bool has_Font() const {
675 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Font" , "", NULL));
676 }
677
678 SkPdfArray Font() const {
679 SkPdfArray ret;
680 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Font", "", &ret)) return ret;
681 // TODO(edisonn): warn about missing required field, assert for known good p dfs
682 return SkPdfArray();
683 }
684
685 /** (Optional) The black-generation function, which maps the interval [0.0 1.0]
686 * to the interval [0.0 1.0] (see Section 6.2.3, "Conversion from DeviceRGB to
687 * DeviceCMYK").
688 **/
689 bool has_BG() const {
690 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BG", "", NULL));
691 }
692
693 SkPdfFunction BG() const {
694 SkPdfFunction ret;
695 if (FunctionFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BG", "" , &ret)) return ret;
696 // TODO(edisonn): warn about missing required field, assert for known good p dfs
697 return SkPdfFunction();
698 }
699
700 /** (Optional; PDF 1.3) Same as BG except that the value may also be the name
701 * Default, denoting the black-generation function that was in effect at the st art
702 * of the page. If both BG and BG2 are present in the same graphics state param -
703 * eter dictionary, BG2 takes precedence.
704 **/
705 bool has_BG2() const {
706 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BG2", "", NULL));
707 }
708
709 bool isBG2AFunction() const {
710 SkPdfObject* ret = NULL;
711 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BG2", "" , &ret)) return false;
712 return ret->podofo()->GetDataType() == ePdfDataType_Reference;
713 }
714
715 SkPdfFunction getBG2AsFunction() const {
716 SkPdfFunction ret = SkPdfFunction();
717 if (FunctionFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BG2", " ", &ret)) return ret;
718 // TODO(edisonn): warn about missing required field, assert for known good p dfs
719 return SkPdfFunction();
720 }
721
722 bool isBG2AName() const {
723 SkPdfObject* ret = NULL;
724 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BG2", "" , &ret)) return false;
725 return ret->podofo()->GetDataType() == ePdfDataType_Name;
726 }
727
728 std::string getBG2AsName() const {
729 std::string ret = "";
730 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BG2", "", & ret)) return ret;
731 // TODO(edisonn): warn about missing required field, assert for known good p dfs
732 return "";
733 }
734
735 /** (Optional) The undercolor-removal function, which maps the interval
736 * [0.0 1.0] to the interval [-1.0 1.0] (see Section 6.2.3, "Conversion from
737 * DeviceRGB to DeviceCMYK").
738 **/
739 bool has_UCR() const {
740 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "UCR", "", NULL));
741 }
742
743 SkPdfFunction UCR() const {
744 SkPdfFunction ret;
745 if (FunctionFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "UCR", " ", &ret)) return ret;
746 // TODO(edisonn): warn about missing required field, assert for known good p dfs
747 return SkPdfFunction();
748 }
749
750 /** (Optional; PDF 1.3) Same as UCR except that the value may also be the name
751 * Default, denoting the undercolor-removal function that was in effect at the
752 * start of the page. If both UCR and UCR2 are present in the same graphics sta te
753 * parameter dictionary, UCR2 takes precedence.
754 **/
755 bool has_UCR2() const {
756 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "UCR2" , "", NULL));
757 }
758
759 bool isUCR2AFunction() const {
760 SkPdfObject* ret = NULL;
761 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "UCR2", " ", &ret)) return false;
762 return ret->podofo()->GetDataType() == ePdfDataType_Reference;
763 }
764
765 SkPdfFunction getUCR2AsFunction() const {
766 SkPdfFunction ret = SkPdfFunction();
767 if (FunctionFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "UCR2", "", &ret)) return ret;
768 // TODO(edisonn): warn about missing required field, assert for known good p dfs
769 return SkPdfFunction();
770 }
771
772 bool isUCR2AName() const {
773 SkPdfObject* ret = NULL;
774 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "UCR2", " ", &ret)) return false;
775 return ret->podofo()->GetDataType() == ePdfDataType_Name;
776 }
777
778 std::string getUCR2AsName() const {
779 std::string ret = "";
780 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "UCR2", "", &ret)) return ret;
781 // TODO(edisonn): warn about missing required field, assert for known good p dfs
782 return "";
783 }
784
785 /** (Optional) The transfer function, which maps the interval [0.0 1.0] to the
786 * interval [0.0 1.0] (see Section 6.3, "Transfer Functions"). The value is eit her
787 * a single function (which applies to all process colorants) or an array of fo ur
788 * functions (which apply to the process colorants individually). The name
789 * Identity may be used to represent the identity function.
790 **/
791 bool has_TR() const {
792 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TR", "", NULL));
793 }
794
795 bool isTRAFunction() const {
796 SkPdfObject* ret = NULL;
797 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TR", "", &ret)) return false;
798 return ret->podofo()->GetDataType() == ePdfDataType_Reference;
799 }
800
801 SkPdfFunction getTRAsFunction() const {
802 SkPdfFunction ret = SkPdfFunction();
803 if (FunctionFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TR", "" , &ret)) return ret;
804 // TODO(edisonn): warn about missing required field, assert for known good p dfs
805 return SkPdfFunction();
806 }
807
808 bool isTRAArray() const {
809 SkPdfObject* ret = NULL;
810 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TR", "", &ret)) return false;
811 return ret->podofo()->GetDataType() == ePdfDataType_Array;
812 }
813
814 SkPdfArray getTRAsArray() const {
815 SkPdfArray ret = SkPdfArray();
816 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TR", "", & ret)) return ret;
817 // TODO(edisonn): warn about missing required field, assert for known good p dfs
818 return SkPdfArray();
819 }
820
821 bool isTRAName() const {
822 SkPdfObject* ret = NULL;
823 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TR", "", &ret)) return false;
824 return ret->podofo()->GetDataType() == ePdfDataType_Name;
825 }
826
827 std::string getTRAsName() const {
828 std::string ret = "";
829 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TR", "", &r et)) return ret;
830 // TODO(edisonn): warn about missing required field, assert for known good p dfs
831 return "";
832 }
833
834 /** (Optional; PDF 1.3) Same as TR except that the value may also be the name
835 * Default, denoting the transfer function that was in effect at the start of t he
836 * page. If both TR and TR2 are present in the same graphics state parameter di c-
837 * tionary, TR2 takes precedence.
838 **/
839 bool has_TR2() const {
840 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TR2", "", NULL));
841 }
842
843 bool isTR2AFunction() const {
844 SkPdfObject* ret = NULL;
845 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TR2", "" , &ret)) return false;
846 return ret->podofo()->GetDataType() == ePdfDataType_Reference;
847 }
848
849 SkPdfFunction getTR2AsFunction() const {
850 SkPdfFunction ret = SkPdfFunction();
851 if (FunctionFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TR2", " ", &ret)) return ret;
852 // TODO(edisonn): warn about missing required field, assert for known good p dfs
853 return SkPdfFunction();
854 }
855
856 bool isTR2AArray() const {
857 SkPdfObject* ret = NULL;
858 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TR2", "" , &ret)) return false;
859 return ret->podofo()->GetDataType() == ePdfDataType_Array;
860 }
861
862 SkPdfArray getTR2AsArray() const {
863 SkPdfArray ret = SkPdfArray();
864 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TR2", "", &ret)) return ret;
865 // TODO(edisonn): warn about missing required field, assert for known good p dfs
866 return SkPdfArray();
867 }
868
869 bool isTR2AName() const {
870 SkPdfObject* ret = NULL;
871 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TR2", "" , &ret)) return false;
872 return ret->podofo()->GetDataType() == ePdfDataType_Name;
873 }
874
875 std::string getTR2AsName() const {
876 std::string ret = "";
877 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TR2", "", & ret)) return ret;
878 // TODO(edisonn): warn about missing required field, assert for known good p dfs
879 return "";
880 }
881
882 /** (Optional) The halftone dictionary or stream (see Section 6.4, "Halftones")
883 * or the name Default, denoting the halftone that was in effect at the start o f the
884 * page.
885 **/
886 bool has_HT() const {
887 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "HT", "", NULL));
888 }
889
890 bool isHTADictionary() const {
891 SkPdfObject* ret = NULL;
892 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "HT", "", &ret)) return false;
893 return ret->podofo()->GetDataType() == ePdfDataType_Dictionary;
894 }
895
896 SkPdfDictionary* getHTAsDictionary() const {
897 SkPdfDictionary* ret = NULL;
898 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "HT", "", &ret)) return ret;
899 // TODO(edisonn): warn about missing required field, assert for known good p dfs
900 return NULL;
901 }
902
903 bool isHTAStream() const {
904 SkPdfObject* ret = NULL;
905 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "HT", "", &ret)) return false;
906 return ret->podofo()->HasStream();
907 }
908
909 SkPdfStream* getHTAsStream() const {
910 SkPdfStream* ret = NULL;
911 if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "HT", "", &ret)) return ret;
912 // TODO(edisonn): warn about missing required field, assert for known good p dfs
913 return NULL;
914 }
915
916 bool isHTAName() const {
917 SkPdfObject* ret = NULL;
918 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "HT", "", &ret)) return false;
919 return ret->podofo()->GetDataType() == ePdfDataType_Name;
920 }
921
922 std::string getHTAsName() const {
923 std::string ret = "";
924 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "HT", "", &r et)) return ret;
925 // TODO(edisonn): warn about missing required field, assert for known good p dfs
926 return "";
927 }
928
929 /** (Optional; PDF 1.3) The flatness tolerance (see Section 6.5.1, "Flatness Tol er-
930 * ance").
931 **/
932 bool has_FL() const {
933 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FL", "", NULL));
934 }
935
936 double FL() const {
937 double ret;
938 if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FL", "", &ret)) return ret;
939 // TODO(edisonn): warn about missing required field, assert for known good p dfs
940 return 0;
941 }
942
943 /** (Optional; PDF 1.3) The smoothness tolerance (see Section 6.5.2, "Smooth-
944 * ness Tolerance").
945 **/
946 bool has_SM() const {
947 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SM", "", NULL));
948 }
949
950 double SM() const {
951 double ret;
952 if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SM", "", &ret)) return ret;
953 // TODO(edisonn): warn about missing required field, assert for known good p dfs
954 return 0;
955 }
956
957 /** (Optional) A flag specifying whether to apply automatic stroke adjustment
958 * (see Section 6.5.4, "Automatic Stroke Adjustment").
959 **/
960 bool has_SA() const {
961 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SA", "", NULL));
962 }
963
964 bool SA() const {
965 bool ret;
966 if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SA", "", &r et)) return ret;
967 // TODO(edisonn): warn about missing required field, assert for known good p dfs
968 return false;
969 }
970
971 /** (Optional; PDF 1.4) The current blend mode to be used in the transparent
972 * imaging model (see Sections 7.2.4, "Blend Mode," and 7.5.2, "Specifying
973 * Blending Color Space and Blend Mode").
974 **/
975 bool has_BM() const {
976 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BM", "", NULL));
977 }
978
979 bool isBMAName() const {
980 SkPdfObject* ret = NULL;
981 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BM", "", &ret)) return false;
982 return ret->podofo()->GetDataType() == ePdfDataType_Name;
983 }
984
985 std::string getBMAsName() const {
986 std::string ret = "";
987 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BM", "", &r et)) return ret;
988 // TODO(edisonn): warn about missing required field, assert for known good p dfs
989 return "";
990 }
991
992 bool isBMAArray() const {
993 SkPdfObject* ret = NULL;
994 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BM", "", &ret)) return false;
995 return ret->podofo()->GetDataType() == ePdfDataType_Array;
996 }
997
998 SkPdfArray getBMAsArray() const {
999 SkPdfArray ret = SkPdfArray();
1000 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BM", "", & ret)) return ret;
1001 // TODO(edisonn): warn about missing required field, assert for known good p dfs
1002 return SkPdfArray();
1003 }
1004
1005 /** (Optional; PDF 1.4) The current soft mask, specifying the mask shape or
1006 * mask opacity values to be used in the transparent imaging model (see
1007 * "Source Shape and Opacity" on page 421 and "Mask Shape and Opacity" on
1008 * page 443).
1009 * Note: Although the current soft mask is sometimes referred to as a "soft cli p,"
1010 * altering it with the gs operator completely replaces the old value with the new
1011 * one, rather than intersecting the two as is done with the current clipping p ath
1012 * parameter (see Section 4.4.3, "Clipping Path Operators").
1013 **/
1014 bool has_SMask() const {
1015 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SMask ", "", NULL));
1016 }
1017
1018 bool isSMaskADictionary() const {
1019 SkPdfObject* ret = NULL;
1020 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SMask", "", &ret)) return false;
1021 return ret->podofo()->GetDataType() == ePdfDataType_Dictionary;
1022 }
1023
1024 SkPdfDictionary* getSMaskAsDictionary() const {
1025 SkPdfDictionary* ret = NULL;
1026 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SMask ", "", &ret)) return ret;
1027 // TODO(edisonn): warn about missing required field, assert for known good p dfs
1028 return NULL;
1029 }
1030
1031 bool isSMaskAName() const {
1032 SkPdfObject* ret = NULL;
1033 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SMask", "", &ret)) return false;
1034 return ret->podofo()->GetDataType() == ePdfDataType_Name;
1035 }
1036
1037 std::string getSMaskAsName() const {
1038 std::string ret = "";
1039 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SMask", "", &ret)) return ret;
1040 // TODO(edisonn): warn about missing required field, assert for known good p dfs
1041 return "";
1042 }
1043
1044 /** (Optional; PDF 1.4) The current stroking alpha constant, specifying the con-
1045 * stant shape or constant opacity value to be used for stroking operations in the
1046 * transparent imaging model (see "Source Shape and Opacity" on page 421
1047 * and "Constant Shape and Opacity" on page 444).
1048 **/
1049 bool has_CA() const {
1050 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CA", "", NULL));
1051 }
1052
1053 double CA() const {
1054 double ret;
1055 if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CA", "", &ret)) return ret;
1056 // TODO(edisonn): warn about missing required field, assert for known good p dfs
1057 return 0;
1058 }
1059
1060 /** (Optional; PDF 1.4) Same as CA, but for nonstroking operations.
1061 **/
1062 bool has_ca() const {
1063 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ca", "", NULL));
1064 }
1065
1066 double ca() const {
1067 double ret;
1068 if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ca", "", &ret)) return ret;
1069 // TODO(edisonn): warn about missing required field, assert for known good p dfs
1070 return 0;
1071 }
1072
1073 /** (Optional; PDF 1.4) The alpha source flag ("alpha is shape"), specifying
1074 * whether the current soft mask and alpha constant are to be interpreted as
1075 * shape values (true) or opacity values (false).
1076 **/
1077 bool has_AIS() const {
1078 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AIS", "", NULL));
1079 }
1080
1081 bool AIS() const {
1082 bool ret;
1083 if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AIS", "", & ret)) return ret;
1084 // TODO(edisonn): warn about missing required field, assert for known good p dfs
1085 return false;
1086 }
1087
1088 /** (Optional; PDF 1.4) The text knockout flag, which determines the behavior
1089 * of overlapping glyphs within a text object in the transparent imaging model
1090 * (see Section 5.2.7, "Text Knockout").
1091 **/
1092 bool has_TK() const {
1093 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TK", "", NULL));
1094 }
1095
1096 bool TK() const {
1097 bool ret;
1098 if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TK", "", &r et)) return ret;
1099 // TODO(edisonn): warn about missing required field, assert for known good p dfs
1100 return false;
1101 }
1102
1103 };
1104
1105 #endif // __DEFINED__SkPdfGraphicsStateDictionary
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698