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

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

Issue 16975013: Deal with ca and CA transparency operators in pdf. add comments to generated classes. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 6 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
1 #ifndef __DEFINED__SkPdfDctdecodeFilterDictionary 1 #ifndef __DEFINED__SkPdfDctdecodeFilterDictionary
2 #define __DEFINED__SkPdfDctdecodeFilterDictionary 2 #define __DEFINED__SkPdfDctdecodeFilterDictionary
3 3
4 #include "SkPdfEnums_autogen.h" 4 #include "SkPdfEnums_autogen.h"
5 #include "SkPdfArray_autogen.h" 5 #include "SkPdfArray_autogen.h"
6 #include "SkPdfDictionary_autogen.h" 6 #include "SkPdfDictionary_autogen.h"
7 7
8 // Optional parameter for the DCTDecode filter
8 class SkPdfDctdecodeFilterDictionary : public SkPdfDictionary { 9 class SkPdfDctdecodeFilterDictionary : public SkPdfDictionary {
9 public: 10 public:
10 virtual SkPdfObjectType getType() const { return kDctdecodeFilterDictionary_Sk PdfObjectType;} 11 virtual SkPdfObjectType getType() const { return kDctdecodeFilterDictionary_Sk PdfObjectType;}
11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kDctdeco deFilterDictionary_SkPdfObjectType + 1);} 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kDctdeco deFilterDictionary_SkPdfObjectType + 1);}
12 public: 13 public:
13 virtual SkPdfDctdecodeFilterDictionary* asDctdecodeFilterDictionary() {return this;} 14 virtual SkPdfDctdecodeFilterDictionary* asDctdecodeFilterDictionary() {return this;}
14 virtual const SkPdfDctdecodeFilterDictionary* asDctdecodeFilterDictionary() co nst {return this;} 15 virtual const SkPdfDctdecodeFilterDictionary* asDctdecodeFilterDictionary() co nst {return this;}
15 16
16 private: 17 private:
17 virtual SkPdfALinkAnnotationDictionary* asALinkAnnotationDictionary() {return NULL;} 18 virtual SkPdfALinkAnnotationDictionary* asALinkAnnotationDictionary() {return NULL;}
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 515
515 public: 516 public:
516 private: 517 private:
517 public: 518 public:
518 SkPdfDctdecodeFilterDictionary(const PdfMemDocument* podofoDoc = NULL, const P dfObject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} 519 SkPdfDctdecodeFilterDictionary(const PdfMemDocument* podofoDoc = NULL, const P dfObject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {}
519 520
520 virtual bool valid() const {return true;} 521 virtual bool valid() const {return true;}
521 522
522 SkPdfDctdecodeFilterDictionary& operator=(const SkPdfDctdecodeFilterDictionary & from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;} 523 SkPdfDctdecodeFilterDictionary& operator=(const SkPdfDctdecodeFilterDictionary & from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
523 524
525 /** ()A code specifying the transformation to be performed on the sample values:
526 * 0 No transformation.
527 * 1 If the image has three color components, transform RGB values to
528 * YUV before encoding and from YUV to RGB after decoding. If the
529 * image has four components, transform CMYK values to YUVK be-
530 * fore encoding and from YUVK to CMYK after decoding. This option
531 * is ignored if the image has one or two color components.
532 * Note: The RGB and YUV used here have nothing to do with the color spaces de-
533 * fined as part of the Adobe imaging model. The purpose of converting from RGB
534 * to YUV is to separate luminance and chrominance information (see below).
535 * The default value of ColorTransform is 1 if the image has three components
536 * and 0 otherwise. In other words, conversion between RGB and YUV is per-
537 * formed for all three-component images unless explicitly disabled by setting
538 * ColorTransform to 0. Additionally, the encoding algorithm inserts an Adobe-
539 * defined marker code in the encoded data indicating the ColorTransform value
540 * used. If present, this marker code overrides the ColorTransform value given to
541 * DCTDecode. Thus it is necessary to specify ColorTransform only when decod-
542 * ing data that does not contain the Adobe-defined marker code.
543 **/
544 bool has_ColorTransform() const {
545 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Color Transform", "", NULL));
546 }
547
524 long ColorTransform() const { 548 long ColorTransform() const {
525 long ret; 549 long ret;
526 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ColorTransf orm", "", &ret)) return ret; 550 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ColorTransf orm", "", &ret)) return ret;
527 // TODO(edisonn): warn about missing required field, assert for known good p dfs 551 // TODO(edisonn): warn about missing required field, assert for known good p dfs
528 return 0; 552 return 0;
529 } 553 }
530 554
531 }; 555 };
532 556
533 #endif // __DEFINED__SkPdfDctdecodeFilterDictionary 557 #endif // __DEFINED__SkPdfDctdecodeFilterDictionary
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698