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

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

Issue 19243003: pdfviewer: native inline images support (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
« no previous file with comments | « experimental/PdfViewer/pdfparser/native/SkPdfNativeTokenizer.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 } 513 }
514 514
515 bool isKeyword() const { 515 bool isKeyword() const {
516 return fObjectType == kKeyword_PdfObjectType; 516 return fObjectType == kKeyword_PdfObjectType;
517 } 517 }
518 518
519 bool isName() const { 519 bool isName() const {
520 return fObjectType == kName_PdfObjectType; 520 return fObjectType == kName_PdfObjectType;
521 } 521 }
522 522
523 bool isName(const char* name) const {
524 return fObjectType == kName_PdfObjectType && fStr.fBytes == strlen(name) && strncmp((const char*)fStr.fBuffer, name, fStr.fBytes) == 0;
525 }
526
523 bool isArray() const { 527 bool isArray() const {
524 return fObjectType == kArray_PdfObjectType; 528 return fObjectType == kArray_PdfObjectType;
525 } 529 }
526 530
527 bool isDate() const { 531 bool isDate() const {
528 return fObjectType == kString_PdfObjectType || fObjectType == kHexString _PdfObjectType; 532 return fObjectType == kString_PdfObjectType || fObjectType == kHexString _PdfObjectType;
529 } 533 }
530 534
531 bool isDictionary() const { 535 bool isDictionary() const {
532 return fObjectType == kDictionary_PdfObjectType; 536 return fObjectType == kDictionary_PdfObjectType;
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
856 }; 860 };
857 861
858 class SkPdfStream : public SkPdfObject {}; 862 class SkPdfStream : public SkPdfObject {};
859 class SkPdfArray : public SkPdfObject {}; 863 class SkPdfArray : public SkPdfObject {};
860 class SkPdfString : public SkPdfObject {}; 864 class SkPdfString : public SkPdfObject {};
861 class SkPdfHexString : public SkPdfObject {}; 865 class SkPdfHexString : public SkPdfObject {};
862 class SkPdfInteger : public SkPdfObject {}; 866 class SkPdfInteger : public SkPdfObject {};
863 class SkPdfReal : public SkPdfObject {}; 867 class SkPdfReal : public SkPdfObject {};
864 class SkPdfNumber : public SkPdfObject {}; 868 class SkPdfNumber : public SkPdfObject {};
865 869
870 class SkPdfName : public SkPdfObject {
871 SkPdfName() : SkPdfObject() {
872 SkPdfObject::makeName((unsigned char*)"", this);
873 }
874 public:
875 SkPdfName(char* name) : SkPdfObject() {
876 this->makeName((unsigned char*)name, this);
877 }
878 };
879
866 #endif // EXPERIMENTAL_PDFVIEWER_PDFPARSER_NATIVE_SKPDFOBJECT_H_ 880 #endif // EXPERIMENTAL_PDFVIEWER_PDFPARSER_NATIVE_SKPDFOBJECT_H_
OLDNEW
« no previous file with comments | « experimental/PdfViewer/pdfparser/native/SkPdfNativeTokenizer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698