| OLD | NEW |
| 1 #ifndef __DEFINED__SkPdfMovieActivationDictionary | 1 #ifndef __DEFINED__SkPdfMovieActivationDictionary |
| 2 #define __DEFINED__SkPdfMovieActivationDictionary | 2 #define __DEFINED__SkPdfMovieActivationDictionary |
| 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 // Entries in a movie activation dictionary | 9 // Entries in a movie activation dictionary |
| 10 class SkPdfMovieActivationDictionary : public SkPdfDictionary { | 10 class SkPdfMovieActivationDictionary : public SkPdfDictionary { |
| (...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 537 * * If it is expressed in a time scale different from that of the movie itsel
f, it is | 537 * * If it is expressed in a time scale different from that of the movie itsel
f, it is |
| 538 * represented as an array of two values: an integer or string denoting the | 538 * represented as an array of two values: an integer or string denoting the |
| 539 * starting time, as above, followed by an integer specifying the time scale
in | 539 * starting time, as above, followed by an integer specifying the time scale
in |
| 540 * units per second. | 540 * units per second. |
| 541 * If this entry is omitted, the movie is played from the beginning. | 541 * If this entry is omitted, the movie is played from the beginning. |
| 542 **/ | 542 **/ |
| 543 bool has_Start() const { | 543 bool has_Start() const { |
| 544 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Start
", "", NULL)); | 544 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Start
", "", NULL)); |
| 545 } | 545 } |
| 546 | 546 |
| 547 SkPdfObject* Start() const { | 547 SkPdfObject* Start() const; |
| 548 SkPdfObject* ret; | |
| 549 if (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Start", "
", &ret)) return ret; | |
| 550 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 551 return NULL; | |
| 552 } | |
| 553 | |
| 554 /** (Optional) The duration of the movie segment to be played, specified in the | 548 /** (Optional) The duration of the movie segment to be played, specified in the |
| 555 * same form as Start. Negative values specify that the movie is to be played | 549 * same form as Start. Negative values specify that the movie is to be played |
| 556 * backward. If this entry is omitted, the movie is played to the end. | 550 * backward. If this entry is omitted, the movie is played to the end. |
| 557 **/ | 551 **/ |
| 558 bool has_Duration() const { | 552 bool has_Duration() const { |
| 559 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Durat
ion", "", NULL)); | 553 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Durat
ion", "", NULL)); |
| 560 } | 554 } |
| 561 | 555 |
| 562 SkPdfObject* Duration() const { | 556 SkPdfObject* Duration() const; |
| 563 SkPdfObject* ret; | |
| 564 if (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Duration"
, "", &ret)) return ret; | |
| 565 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 566 return NULL; | |
| 567 } | |
| 568 | |
| 569 /** (Optional) The initial speed at which to play the movie. If the value of thi
s | 557 /** (Optional) The initial speed at which to play the movie. If the value of thi
s |
| 570 * entry is negative, the movie is played backward with respect to Start and | 558 * entry is negative, the movie is played backward with respect to Start and |
| 571 * Duration. Default value: 1.0. | 559 * Duration. Default value: 1.0. |
| 572 **/ | 560 **/ |
| 573 bool has_Rate() const { | 561 bool has_Rate() const { |
| 574 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Rate"
, "", NULL)); | 562 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Rate"
, "", NULL)); |
| 575 } | 563 } |
| 576 | 564 |
| 577 double Rate() const { | 565 double Rate() const; |
| 578 double ret; | |
| 579 if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Rate", ""
, &ret)) return ret; | |
| 580 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 581 return 0; | |
| 582 } | |
| 583 | |
| 584 /** (Optional) The initial sound volume at which to play the movie, in the range | 566 /** (Optional) The initial sound volume at which to play the movie, in the range |
| 585 * -1.0 to 1.0. Higher values denote greater volume; negative values mute the | 567 * -1.0 to 1.0. Higher values denote greater volume; negative values mute the |
| 586 * sound. Default value: 1.0. | 568 * sound. Default value: 1.0. |
| 587 **/ | 569 **/ |
| 588 bool has_Volume() const { | 570 bool has_Volume() const { |
| 589 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Volum
e", "", NULL)); | 571 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Volum
e", "", NULL)); |
| 590 } | 572 } |
| 591 | 573 |
| 592 double Volume() const { | 574 double Volume() const; |
| 593 double ret; | |
| 594 if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Volume",
"", &ret)) return ret; | |
| 595 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 596 return 0; | |
| 597 } | |
| 598 | |
| 599 /** (Optional) A flag specifying whether to display a movie controller bar while | 575 /** (Optional) A flag specifying whether to display a movie controller bar while |
| 600 * playing the movie. Default value: false. | 576 * playing the movie. Default value: false. |
| 601 **/ | 577 **/ |
| 602 bool has_ShowControls() const { | 578 bool has_ShowControls() const { |
| 603 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ShowC
ontrols", "", NULL)); | 579 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ShowC
ontrols", "", NULL)); |
| 604 } | 580 } |
| 605 | 581 |
| 606 bool ShowControls() const { | 582 bool ShowControls() const; |
| 607 bool ret; | |
| 608 if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ShowControl
s", "", &ret)) return ret; | |
| 609 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 610 return false; | |
| 611 } | |
| 612 | |
| 613 /** (Optional) The play mode for playing the movie: | 583 /** (Optional) The play mode for playing the movie: |
| 614 * Once Play once and stop. | 584 * Once Play once and stop. |
| 615 * Open Play and leave the movie controller bar open. | 585 * Open Play and leave the movie controller bar open. |
| 616 * Repeat Play repeatedly from beginning to end until stopped. | 586 * Repeat Play repeatedly from beginning to end until stopped. |
| 617 * Palindrome Play continuously forward and backward until stopped. | 587 * Palindrome Play continuously forward and backward until stopped. |
| 618 * Default value: Once. | 588 * Default value: Once. |
| 619 **/ | 589 **/ |
| 620 bool has_Mode() const { | 590 bool has_Mode() const { |
| 621 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Mode"
, "", NULL)); | 591 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Mode"
, "", NULL)); |
| 622 } | 592 } |
| 623 | 593 |
| 624 std::string Mode() const { | 594 std::string Mode() const; |
| 625 std::string ret; | |
| 626 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Mode", "",
&ret)) return ret; | |
| 627 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 628 return ""; | |
| 629 } | |
| 630 | |
| 631 /** (Optional) A flag specifying whether to play the movie synchronously or | 595 /** (Optional) A flag specifying whether to play the movie synchronously or |
| 632 * asynchronously. If this value is true, the movie player will retain control
until | 596 * asynchronously. If this value is true, the movie player will retain control
until |
| 633 * the movie is completed or dismissed by the user; if false, it will return co
ntrol | 597 * the movie is completed or dismissed by the user; if false, it will return co
ntrol |
| 634 * to the viewer application immediately after starting the movie. Default valu
e: | 598 * to the viewer application immediately after starting the movie. Default valu
e: |
| 635 * false. | 599 * false. |
| 636 **/ | 600 **/ |
| 637 bool has_Synchronous() const { | 601 bool has_Synchronous() const { |
| 638 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Synch
ronous", "", NULL)); | 602 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Synch
ronous", "", NULL)); |
| 639 } | 603 } |
| 640 | 604 |
| 641 bool Synchronous() const { | 605 bool Synchronous() const; |
| 642 bool ret; | |
| 643 if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Synchronous
", "", &ret)) return ret; | |
| 644 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 645 return false; | |
| 646 } | |
| 647 | |
| 648 /** (Optional) The magnification (zoom) factor at which to play the movie. The | 606 /** (Optional) The magnification (zoom) factor at which to play the movie. The |
| 649 * presence of this entry implies that the movie is to be played in a floating
win- | 607 * presence of this entry implies that the movie is to be played in a floating
win- |
| 650 * dow; if the entry is absent, it will be played in the annotation rectangle. | 608 * dow; if the entry is absent, it will be played in the annotation rectangle. |
| 651 * The value of the entry is an array of two integers, [numerator denominator], | 609 * The value of the entry is an array of two integers, [numerator denominator], |
| 652 * denoting a rational magnification factor for the movie. The final window | 610 * denoting a rational magnification factor for the movie. The final window |
| 653 * size, in pixels, is | 611 * size, in pixels, is |
| 654 * (numerator / denominator) x Aspect | 612 * (numerator / denominator) x Aspect |
| 655 * where the value of Aspect is taken from the movie dictionary (see Table 8.79
). | 613 * where the value of Aspect is taken from the movie dictionary (see Table 8.79
). |
| 656 **/ | 614 **/ |
| 657 bool has_FWScale() const { | 615 bool has_FWScale() const { |
| 658 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FWSca
le", "", NULL)); | 616 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FWSca
le", "", NULL)); |
| 659 } | 617 } |
| 660 | 618 |
| 661 SkPdfArray* FWScale() const { | 619 SkPdfArray* FWScale() const; |
| 662 SkPdfArray* ret; | |
| 663 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FWScale",
"", &ret)) return ret; | |
| 664 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 665 return NULL; | |
| 666 } | |
| 667 | |
| 668 /** (Optional) For floating play windows, the relative position of the window on | 620 /** (Optional) For floating play windows, the relative position of the window on |
| 669 * the screen. The value is an array of two numbers | 621 * the screen. The value is an array of two numbers |
| 670 * [horiz vert] | 622 * [horiz vert] |
| 671 * each in the range 0.0 to 1.0, denoting the relative horizontal and vertical
posi- | 623 * each in the range 0.0 to 1.0, denoting the relative horizontal and vertical
posi- |
| 672 * tion of the movie window with respect to the screen. For example, the value | 624 * tion of the movie window with respect to the screen. For example, the value |
| 673 * [0.5 0.5] centers the window on the screen. Default value: [0.5 0.5]. | 625 * [0.5 0.5] centers the window on the screen. Default value: [0.5 0.5]. |
| 674 * CHAPTER 9 | 626 * CHAPTER 9 |
| 675 **/ | 627 **/ |
| 676 bool has_FWPosition() const { | 628 bool has_FWPosition() const { |
| 677 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FWPos
ition", "", NULL)); | 629 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FWPos
ition", "", NULL)); |
| 678 } | 630 } |
| 679 | 631 |
| 680 SkPdfArray* FWPosition() const { | 632 SkPdfArray* FWPosition() const; |
| 681 SkPdfArray* ret; | |
| 682 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FWPosition
", "", &ret)) return ret; | |
| 683 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 684 return NULL; | |
| 685 } | |
| 686 | |
| 687 }; | 633 }; |
| 688 | 634 |
| 689 #endif // __DEFINED__SkPdfMovieActivationDictionary | 635 #endif // __DEFINED__SkPdfMovieActivationDictionary |
| OLD | NEW |