OLD | NEW |
1 #ifndef __DEFINED__SkPdfArtifactsDictionary | 1 #ifndef __DEFINED__SkPdfArtifactsDictionary |
2 #define __DEFINED__SkPdfArtifactsDictionary | 2 #define __DEFINED__SkPdfArtifactsDictionary |
3 | 3 |
4 #include "SkPdfUtils.h" | 4 #include "SkPdfUtils.h" |
5 #include "SkPdfEnums_autogen.h" | 5 #include "SkPdfEnums_autogen.h" |
6 #include "SkPdfArray_autogen.h" | 6 #include "SkPdfArray_autogen.h" |
7 #include "SkPdfDictionary_autogen.h" | 7 #include "SkPdfDictionary_autogen.h" |
8 | 8 |
9 // Property list entries for artifacts | 9 // Property list entries for artifacts |
10 class SkPdfArtifactsDictionary : public SkPdfDictionary { | 10 class SkPdfArtifactsDictionary : public SkPdfDictionary { |
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
525 | 525 |
526 SkPdfArtifactsDictionary& operator=(const SkPdfArtifactsDictionary& from) {thi
s->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *thi
s;} | 526 SkPdfArtifactsDictionary& operator=(const SkPdfArtifactsDictionary& from) {thi
s->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *thi
s;} |
527 | 527 |
528 /** (Optional) The type of artifact that this property list describes; if presen
t, must | 528 /** (Optional) The type of artifact that this property list describes; if presen
t, must |
529 * be one of the names Pagination, Layout, or Page. | 529 * be one of the names Pagination, Layout, or Page. |
530 **/ | 530 **/ |
531 bool has_Type() const { | 531 bool has_Type() const { |
532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type"
, "", NULL)); | 532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type"
, "", NULL)); |
533 } | 533 } |
534 | 534 |
535 std::string Type() const { | 535 std::string Type() const; |
536 std::string ret; | |
537 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "",
&ret)) return ret; | |
538 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
539 return ""; | |
540 } | |
541 | |
542 /** (Optional) An array of four numbers in default user space units giving the c
oor- | 536 /** (Optional) An array of four numbers in default user space units giving the c
oor- |
543 * dinates of the left, bottom, right, and top edges, respectively, of the arti
fact's | 537 * dinates of the left, bottom, right, and top edges, respectively, of the arti
fact's |
544 * bounding box (the rectangle that completely encloses its visible extent). | 538 * bounding box (the rectangle that completely encloses its visible extent). |
545 **/ | 539 **/ |
546 bool has_BBox() const { | 540 bool has_BBox() const { |
547 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BBox"
, "", NULL)); | 541 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BBox"
, "", NULL)); |
548 } | 542 } |
549 | 543 |
550 SkRect* BBox() const { | 544 SkRect* BBox() const; |
551 SkRect* ret; | |
552 if (SkRectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "BBox", ""
, &ret)) return ret; | |
553 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
554 return NULL; | |
555 } | |
556 | |
557 /** (Optional; pagination artifacts only) An array of name objects containing on
e to | 545 /** (Optional; pagination artifacts only) An array of name objects containing on
e to |
558 * four of the names Top, Bottom, Left, and Right, specifying the edges of the
page, if | 546 * four of the names Top, Bottom, Left, and Right, specifying the edges of the
page, if |
559 * any, to which the artifact is logically attached. Page edges are defined by
the | 547 * any, to which the artifact is logically attached. Page edges are defined by
the |
560 * page's crop box (see Section 9.10.1, "Page Boundaries"). The ordering of nam
es | 548 * page's crop box (see Section 9.10.1, "Page Boundaries"). The ordering of nam
es |
561 * within the array is immaterial. Including both Left and Right or both Top an
d | 549 * within the array is immaterial. Including both Left and Right or both Top an
d |
562 * Bottom indicates a full-width or full-height artifact, respectively. | 550 * Bottom indicates a full-width or full-height artifact, respectively. |
563 **/ | 551 **/ |
564 bool has_Attached() const { | 552 bool has_Attached() const { |
565 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Attac
hed", "", NULL)); | 553 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Attac
hed", "", NULL)); |
566 } | 554 } |
567 | 555 |
568 SkPdfArray* Attached() const { | 556 SkPdfArray* Attached() const; |
569 SkPdfArray* ret; | |
570 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Attached",
"", &ret)) return ret; | |
571 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
572 return NULL; | |
573 } | |
574 | |
575 }; | 557 }; |
576 | 558 |
577 #endif // __DEFINED__SkPdfArtifactsDictionary | 559 #endif // __DEFINED__SkPdfArtifactsDictionary |
OLD | NEW |