OLD | NEW |
1 #ifndef __DEFINED__SkPdfTransitionDictionary | 1 #ifndef __DEFINED__SkPdfTransitionDictionary |
2 #define __DEFINED__SkPdfTransitionDictionary | 2 #define __DEFINED__SkPdfTransitionDictionary |
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 // Entries in a transition dictionary |
8 class SkPdfTransitionDictionary : public SkPdfDictionary { | 9 class SkPdfTransitionDictionary : public SkPdfDictionary { |
9 public: | 10 public: |
10 virtual SkPdfObjectType getType() const { return kTransitionDictionary_SkPdfOb
jectType;} | 11 virtual SkPdfObjectType getType() const { return kTransitionDictionary_SkPdfOb
jectType;} |
11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kTransit
ionDictionary_SkPdfObjectType + 1);} | 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kTransit
ionDictionary_SkPdfObjectType + 1);} |
12 public: | 13 public: |
13 virtual SkPdfTransitionDictionary* asTransitionDictionary() {return this;} | 14 virtual SkPdfTransitionDictionary* asTransitionDictionary() {return this;} |
14 virtual const SkPdfTransitionDictionary* asTransitionDictionary() const {retur
n this;} | 15 virtual const SkPdfTransitionDictionary* asTransitionDictionary() const {retur
n 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 Loading... |
514 | 515 |
515 public: | 516 public: |
516 private: | 517 private: |
517 public: | 518 public: |
518 SkPdfTransitionDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfObj
ect* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} | 519 SkPdfTransitionDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfObj
ect* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} |
519 | 520 |
520 virtual bool valid() const {return true;} | 521 virtual bool valid() const {return true;} |
521 | 522 |
522 SkPdfTransitionDictionary& operator=(const SkPdfTransitionDictionary& from) {t
his->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *t
his;} | 523 SkPdfTransitionDictionary& operator=(const SkPdfTransitionDictionary& from) {t
his->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *t
his;} |
523 | 524 |
| 525 /** (Optional) The type of PDF object that this dictionary describes; if present
, must be |
| 526 * Trans for a transition dictionary. |
| 527 **/ |
| 528 bool has_Type() const { |
| 529 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type"
, "", NULL)); |
| 530 } |
| 531 |
524 std::string Type() const { | 532 std::string Type() const { |
525 std::string ret; | 533 std::string ret; |
526 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "",
&ret)) return ret; | 534 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "",
&ret)) return ret; |
527 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 535 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
528 return ""; | 536 return ""; |
529 } | 537 } |
530 | 538 |
| 539 /** (Optional) The duration of the transition effect, in seconds. Default value:
1. |
| 540 **/ |
| 541 bool has_D() const { |
| 542 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "
", NULL)); |
| 543 } |
| 544 |
531 double D() const { | 545 double D() const { |
532 double ret; | 546 double ret; |
533 if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", &
ret)) return ret; | 547 if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "D", "", &
ret)) return ret; |
534 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 548 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
535 return 0; | 549 return 0; |
536 } | 550 } |
537 | 551 |
| 552 /** (Optional) The transition style to use when moving to this page from another
during a |
| 553 * presentation: |
| 554 * Split Two lines sweep across the screen, revealing the new page. Th
e lines may |
| 555 * be either horizontal or vertical and may move inward from the
edges of |
| 556 * the page or outward from the center, as specified by the Dm a
nd M |
| 557 * entries, respectively. |
| 558 * Blinds Multiple lines, evenly spaced across the screen, synchronousl
y sweep in |
| 559 * the same direction to reveal the new page. The lines may be e
ither hori- |
| 560 * zontal or vertical, as specified by the Dm entry. Horizontal
lines move |
| 561 * downward, vertical lines to the right. |
| 562 * Box A rectangular box sweeps inward from the edges of the page or
outward |
| 563 * from the center, as specified by the M entry, revealing the n
ew page. |
| 564 * Wipe A single line sweeps across the screen from one edge to the o
ther in the |
| 565 * direction specified by the Di entry, revealing the new page. |
| 566 * Dissolve The old page "dissolves" gradually to reveal the new one. |
| 567 * Glitter Similar to Dissolve, except that the effect sweeps across the
page in a |
| 568 * wide band moving from one side of the screen to the other in
the direc- |
| 569 * tion specified by the Di entry. |
| 570 * R The new page simply replaces the old one with no special tran
sition ef- |
| 571 * fect; the D entry is ignored. |
| 572 * Default value: R. |
| 573 **/ |
| 574 bool has_S() const { |
| 575 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "
", NULL)); |
| 576 } |
| 577 |
538 std::string S() const { | 578 std::string S() const { |
539 std::string ret; | 579 std::string ret; |
540 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &re
t)) return ret; | 580 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &re
t)) return ret; |
541 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 581 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
542 return ""; | 582 return ""; |
543 } | 583 } |
544 | 584 |
| 585 /** (Optional; Split and Blinds transition styles only) The dimension in which t
he specified |
| 586 * transition effect occurs: |
| 587 * H Horizontal |
| 588 * V Vertical |
| 589 * Default value: H. |
| 590 **/ |
| 591 bool has_Dm() const { |
| 592 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Dm",
"", NULL)); |
| 593 } |
| 594 |
545 std::string Dm() const { | 595 std::string Dm() const { |
546 std::string ret; | 596 std::string ret; |
547 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Dm", "", &r
et)) return ret; | 597 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Dm", "", &r
et)) return ret; |
548 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 598 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
549 return ""; | 599 return ""; |
550 } | 600 } |
551 | 601 |
| 602 /** (Optional; Split and Box transition styles only) The direction of motion for
the specified |
| 603 * transition effect: |
| 604 * I Inward from the edges of the page |
| 605 * O Outward from the center of the page |
| 606 * Default value: I. |
| 607 **/ |
| 608 bool has_M() const { |
| 609 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "M", "
", NULL)); |
| 610 } |
| 611 |
552 std::string M() const { | 612 std::string M() const { |
553 std::string ret; | 613 std::string ret; |
554 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "M", "", &re
t)) return ret; | 614 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "M", "", &re
t)) return ret; |
555 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 615 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
556 return ""; | 616 return ""; |
557 } | 617 } |
558 | 618 |
| 619 /** (Optional; Wipe and Glitter transition styles only) The direction in which t
he specified |
| 620 * transition effect moves, expressed in degrees counterclockwise starting from
a left-to- |
| 621 * right direction. (Note that this differs from the page object's Rotate entry
, which is |
| 622 * measured clockwise from the top.) Only the following values are valid: |
| 623 * 0 Left to right |
| 624 * 90 Bottom to top (Wipe only) |
| 625 * 180 Right to left (Wipe only) |
| 626 * 270 Top to bottom |
| 627 * 315 Top-left to bottom-right (Glitter only) |
| 628 * Default value: 0. |
| 629 **/ |
| 630 bool has_Di() const { |
| 631 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Di",
"", NULL)); |
| 632 } |
| 633 |
559 double Di() const { | 634 double Di() const { |
560 double ret; | 635 double ret; |
561 if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Di", "",
&ret)) return ret; | 636 if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Di", "",
&ret)) return ret; |
562 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 637 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
563 return 0; | 638 return 0; |
564 } | 639 } |
565 | 640 |
566 }; | 641 }; |
567 | 642 |
568 #endif // __DEFINED__SkPdfTransitionDictionary | 643 #endif // __DEFINED__SkPdfTransitionDictionary |
OLD | NEW |