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

Side by Side Diff: experimental/PdfViewer/pdfparser/native/SkPdfObject.h

Issue 21288002: pdfviewer: (in progress, uploaded for backup): transparency groups - isolated and knockout flags (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 4 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 EXPERIMENTAL_PDFVIEWER_PDFPARSER_NATIVE_SKPDFOBJECT_H_ 1 #ifndef EXPERIMENTAL_PDFVIEWER_PDFPARSER_NATIVE_SKPDFOBJECT_H_
2 #define EXPERIMENTAL_PDFVIEWER_PDFPARSER_NATIVE_SKPDFOBJECT_H_ 2 #define EXPERIMENTAL_PDFVIEWER_PDFPARSER_NATIVE_SKPDFOBJECT_H_
3 3
4 #include <stdint.h> 4 #include <stdint.h>
5 #include <string.h> 5 #include <string.h>
6 #include <string> 6 #include <string>
7 #include "SkTDArray.h" 7 #include "SkTDArray.h"
8 #include "SkTDict.h" 8 #include "SkTDict.h"
9 #include "SkRect.h" 9 #include "SkRect.h"
10 #include "SkMatrix.h" 10 #include "SkMatrix.h"
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 static SkPdfFileSpec nyi; 162 static SkPdfFileSpec nyi;
163 return nyi; 163 return nyi;
164 } 164 }
165 165
166 // TODO(edisonn): NYI 166 // TODO(edisonn): NYI
167 SkPdfTree& treeValue() const { 167 SkPdfTree& treeValue() const {
168 static SkPdfTree nyi; 168 static SkPdfTree nyi;
169 return nyi; 169 return nyi;
170 } 170 }
171 171
172
173 static void makeBoolean(bool value, SkPdfObject* obj) { 172 static void makeBoolean(bool value, SkPdfObject* obj) {
174 SkASSERT(obj->fObjectType == kInvalid_PdfObjectType); 173 SkASSERT(obj->fObjectType == kInvalid_PdfObjectType);
175 174
176 obj->fObjectType = kBoolean_PdfObjectType; 175 obj->fObjectType = kBoolean_PdfObjectType;
177 obj->fBooleanValue = value; 176 obj->fBooleanValue = value;
178 } 177 }
179 178
180 static SkPdfObject makeBoolean(bool value) { 179 static SkPdfObject makeBoolean(bool value) {
181 SkPdfObject obj; 180 SkPdfObject obj;
182 obj.fObjectType = kBoolean_PdfObjectType; 181 obj.fObjectType = kBoolean_PdfObjectType;
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 if (fObjectType != kString_PdfObjectType && fObjectType != kHexString_Pd fObjectType) { 695 if (fObjectType != kString_PdfObjectType && fObjectType != kHexString_Pd fObjectType) {
697 // TODO(edisonn): log err 696 // TODO(edisonn): log err
698 return ""; 697 return "";
699 } 698 }
700 return std::string((const char*)fStr.fBuffer, fStr.fBytes); 699 return std::string((const char*)fStr.fBuffer, fStr.fBytes);
701 } 700 }
702 701
703 inline bool boolValue() const { 702 inline bool boolValue() const {
704 SkASSERT(fObjectType == kBoolean_PdfObjectType); 703 SkASSERT(fObjectType == kBoolean_PdfObjectType);
705 704
706 if (fObjectType == kBoolean_PdfObjectType) { 705 if (fObjectType != kBoolean_PdfObjectType) {
707 // TODO(edisonn): log err 706 // TODO(edisonn): log err
708 return false; 707 return false;
709 } 708 }
710 return fBooleanValue; 709 return fBooleanValue;
711 } 710 }
712 711
713 SkRect rectangleValue() const { 712 SkRect rectangleValue() const {
714 SkASSERT(isRectangle()); 713 SkASSERT(isRectangle());
715 if (!isRectangle()) { 714 if (!isRectangle()) {
716 return SkRect::MakeEmpty(); 715 return SkRect::MakeEmpty();
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
926 SkPdfName() : SkPdfObject() { 925 SkPdfName() : SkPdfObject() {
927 SkPdfObject::makeName((const unsigned char*)"", this); 926 SkPdfObject::makeName((const unsigned char*)"", this);
928 } 927 }
929 public: 928 public:
930 SkPdfName(char* name) : SkPdfObject() { 929 SkPdfName(char* name) : SkPdfObject() {
931 this->makeName((const unsigned char*)name, this); 930 this->makeName((const unsigned char*)name, this);
932 } 931 }
933 }; 932 };
934 933
935 #endif // EXPERIMENTAL_PDFVIEWER_PDFPARSER_NATIVE_SKPDFOBJECT_H_ 934 #endif // EXPERIMENTAL_PDFVIEWER_PDFPARSER_NATIVE_SKPDFOBJECT_H_
OLDNEW
« no previous file with comments | « experimental/PdfViewer/pdfparser/native/SkPdfNativeTokenizer.cpp ('k') | experimental/PdfViewer/spec2def.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698