Changeset 1342
- Timestamp:
- 03/24/08 03:19:03 (3 months ago)
- Files:
-
- mochikit/trunk/doc/html/MochiKit/Visual.html (modified) (6 diffs)
- mochikit/trunk/doc/rst/MochiKit/Visual.rst (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
mochikit/trunk/doc/html/MochiKit/Visual.html
r1341 r1342 531 531 <table border="1" class="last docutils"> 532 532 <colgroup> 533 <col width="30%" /> 534 <col width="70%" /> 535 </colgroup> 536 <tbody valign="top"> 537 <tr><td>direction</td> 538 <td><tt class="docutils literal"><span class="pre">"center"</span></tt></td> 539 </tr> 540 <tr><td>moveTransition</td> 541 <td><tt class="docutils literal"><span class="pre">MochiKit.Visual.Transitions.sinoidal</span></tt></td> 542 </tr> 543 <tr><td>scaleTransition</td> 544 <td><tt class="docutils literal"><span class="pre">MochiKit.Visual.Transitions.sinoidal</span></tt></td> 545 </tr> 546 <tr><td>opacityTransition</td> 547 <td><tt class="docutils literal"><span class="pre">MochiKit.Visual.Transitions.full</span></tt></td> 548 </tr> 549 </tbody> 550 </table> 551 </dd> 552 </dl> 553 <p>The <tt class="docutils literal"><span class="pre">direction</span></tt> option controls the origin point of the effect. 554 The following values are allowed:</p> 555 <blockquote> 556 <table border="1" class="docutils"> 557 <colgroup> 533 558 <col width="34%" /> 534 559 <col width="66%" /> 535 560 </colgroup> 536 561 <tbody valign="top"> 537 <tr><td><tt class="docutils literal"><span class="pre">direction</span></tt></td> 538 <td><tt class="docutils literal"><span class="pre">center</span></tt></td> 539 </tr> 540 <tr><td><tt class="docutils literal"><span class="pre">moveTransition</span></tt></td> 541 <td><tt class="docutils literal"><span class="pre">MochiKit.Visual.Transitions.sinoidal</span></tt></td> 542 </tr> 543 <tr><td><tt class="docutils literal"><span class="pre">scaleTransition</span></tt></td> 544 <td><tt class="docutils literal"><span class="pre">MochiKit.Visual.Transitions.sinoidal</span></tt></td> 545 </tr> 546 <tr><td><tt class="docutils literal"><span class="pre">opacityTransition</span></tt></td> 547 <td><tt class="docutils literal"><span class="pre">MochiKit.Visual.Transitions.full</span></tt></td> 548 </tr> 549 </tbody> 550 </table> 551 </dd> 552 </dl> 553 <p>The <tt class="docutils literal"><span class="pre">direction</span></tt> option controls the origin point of the effect. 554 The following values are allowed:</p> 555 <blockquote> 556 <table border="1" class="docutils"> 557 <colgroup> 558 <col width="34%" /> 559 <col width="66%" /> 560 </colgroup> 561 <tbody valign="top"> 562 <tr><td><tt class="docutils literal"><span class="pre">center</span></tt></td> 562 <tr><td><tt class="docutils literal"><span class="pre">"center"</span></tt></td> 563 563 <td>Grows from the center</td> 564 564 </tr> 565 <tr><td><tt class="docutils literal"><span class="pre"> top-left</span></tt></td>565 <tr><td><tt class="docutils literal"><span class="pre">"top-left"</span></tt></td> 566 566 <td>Grows from the top left corner</td> 567 567 </tr> 568 <tr><td><tt class="docutils literal"><span class="pre"> top-right</span></tt></td>568 <tr><td><tt class="docutils literal"><span class="pre">"top-right"</span></tt></td> 569 569 <td>Grows from the top right corner</td> 570 570 </tr> 571 <tr><td><tt class="docutils literal"><span class="pre"> bottom-left</span></tt></td>571 <tr><td><tt class="docutils literal"><span class="pre">"bottom-left"</span></tt></td> 572 572 <td>Grows from the bottom left corner</td> 573 573 </tr> 574 <tr><td><tt class="docutils literal"><span class="pre"> bottom-right</span></tt></td>574 <tr><td><tt class="docutils literal"><span class="pre">"bottom-right"</span></tt></td> 575 575 <td>Grows from the bottom right corner</td> 576 576 </tr> … … 603 603 <table border="1" class="last docutils"> 604 604 <colgroup> 605 <col width="30%" /> 606 <col width="70%" /> 607 </colgroup> 608 <tbody valign="top"> 609 <tr><td>direction</td> 610 <td><tt class="docutils literal"><span class="pre">"center"</span></tt></td> 611 </tr> 612 <tr><td>moveTransition</td> 613 <td><tt class="docutils literal"><span class="pre">MochiKit.Visual.Transitions.sinoidal</span></tt></td> 614 </tr> 615 <tr><td>scaleTransition</td> 616 <td><tt class="docutils literal"><span class="pre">MochiKit.Visual.Transitions.sinoidal</span></tt></td> 617 </tr> 618 <tr><td>opacityTransition</td> 619 <td><tt class="docutils literal"><span class="pre">MochiKit.Visual.Transitions.full</span></tt></td> 620 </tr> 621 </tbody> 622 </table> 623 </dd> 624 </dl> 625 <p>The <tt class="docutils literal"><span class="pre">direction</span></tt> option controls the destination point of the 626 effect. The following values are allowed:</p> 627 <blockquote> 628 <table border="1" class="docutils"> 629 <colgroup> 605 630 <col width="34%" /> 606 631 <col width="66%" /> 607 632 </colgroup> 608 633 <tbody valign="top"> 609 <tr><td><tt class="docutils literal"><span class="pre">direction</span></tt></td> 610 <td><tt class="docutils literal"><span class="pre">center</span></tt></td> 611 </tr> 612 <tr><td><tt class="docutils literal"><span class="pre">moveTransition</span></tt></td> 613 <td><tt class="docutils literal"><span class="pre">MochiKit.Visual.Transitions.sinoidal</span></tt></td> 614 </tr> 615 <tr><td><tt class="docutils literal"><span class="pre">scaleTransition</span></tt></td> 616 <td><tt class="docutils literal"><span class="pre">MochiKit.Visual.Transitions.sinoidal</span></tt></td> 617 </tr> 618 <tr><td><tt class="docutils literal"><span class="pre">opacityTransition</span></tt></td> 619 <td><tt class="docutils literal"><span class="pre">MochiKit.Visual.Transitions.none</span></tt></td> 620 </tr> 621 </tbody> 622 </table> 623 </dd> 624 </dl> 625 <p>The <tt class="docutils literal"><span class="pre">direction</span></tt> option controls the destination point of the 626 effect. The following values are allowed:</p> 627 <blockquote> 628 <table border="1" class="docutils"> 629 <colgroup> 630 <col width="34%" /> 631 <col width="66%" /> 632 </colgroup> 633 <tbody valign="top"> 634 <tr><td><tt class="docutils literal"><span class="pre">center</span></tt></td> 635 <td>Shrinks to the center</td> 636 </tr> 637 <tr><td><tt class="docutils literal"><span class="pre">top-left</span></tt></td> 638 <td>Shrinks to the top left corner</td> 639 </tr> 640 <tr><td><tt class="docutils literal"><span class="pre">top-right</span></tt></td> 641 <td>Shrinks to the top right corner</td> 642 </tr> 643 <tr><td><tt class="docutils literal"><span class="pre">bottom-left</span></tt></td> 644 <td>Shrinks to the bottom left corner</td> 645 </tr> 646 <tr><td><tt class="docutils literal"><span class="pre">bottom-right</span></tt></td> 647 <td>Shrinks to the bottom right corner</td> 634 <tr><td><tt class="docutils literal"><span class="pre">"center"</span></tt></td> 635 <td>Grows from the center</td> 636 </tr> 637 <tr><td><tt class="docutils literal"><span class="pre">"top-left"</span></tt></td> 638 <td>Grows from the top left corner</td> 639 </tr> 640 <tr><td><tt class="docutils literal"><span class="pre">"top-right"</span></tt></td> 641 <td>Grows from the top right corner</td> 642 </tr> 643 <tr><td><tt class="docutils literal"><span class="pre">"bottom-left"</span></tt></td> 644 <td>Grows from the bottom left corner</td> 645 </tr> 646 <tr><td><tt class="docutils literal"><span class="pre">"bottom-right"</span></tt></td> 647 <td>Grows from the bottom right corner</td> 648 648 </tr> 649 649 </tbody> … … 711 711 <h2><a id="basic-effects-classes" name="basic-effects-classes">Basic Effects classes</a></h2> 712 712 <p> 713 <a name="fn-transitions"></a> 714 <a class="mochidef reference" href="#fn-transitions">Transitions</a>:</p> 715 <blockquote> 716 <p>Default transition functions available for all effects. A transition 717 function adjusts the current position value between 0 and 1 in order 718 to achieve a non-linear sequence of position values for the effect.</p> 719 <table border="1" class="docutils"> 720 <colgroup> 721 <col width="21%" /> 722 <col width="79%" /> 723 </colgroup> 724 <tbody valign="top"> 725 <tr><td>linear</td> 726 <td>A straight linear transition.</td> 727 </tr> 728 <tr><td>sinoidal</td> 729 <td>A smooth sine value transition.</td> 730 </tr> 731 <tr><td>reverse</td> 732 <td>A reverse linear transition.</td> 733 </tr> 734 <tr><td>flicker</td> 735 <td>A sine transition with random additions.</td> 736 </tr> 737 <tr><td>wobble</td> 738 <td>A multi-period sine curve transition.</td> 739 </tr> 740 <tr><td>pulse</td> 741 <td>A multi-period triangle curve transition.</td> 742 </tr> 743 <tr><td>none</td> 744 <td>A fixed zero (0) value transition.</td> 745 </tr> 746 <tr><td>full</td> 747 <td>A fixed one (1) value transition.</td> 748 </tr> 749 </tbody> 750 </table> 751 <dl class="docutils"> 752 <dt><em>Availability</em>:</dt> 753 <dd>Available in MochiKit 1.4+</dd> 754 </dl> 755 </blockquote> 756 <p> 713 757 <a name="fn-defaultoptions"></a> 714 758 <a class="mochidef reference" href="#fn-defaultoptions">DefaultOptions</a>:</p> 715 759 <blockquote> 716 <p>Default options for all Effect creation.</p> 760 <p>Default options for all effects. Note that all effects inherit 761 the <a class="mochiref reference" href="#fn-base">Base</a> class and thereby also support a number of 762 events, that can be specified as callback functions among the 763 effect options.</p> 717 764 <table border="1" class="docutils"> 718 765 <colgroup> 719 <col width=" 22%" />720 <col width=" 78%" />766 <col width="17%" /> 767 <col width="83%" /> 721 768 </colgroup> 722 769 <tbody valign="top"> … … 725 772 </tr> 726 773 <tr><td>duration</td> 727 <td><tt class="docutils literal"><span class="pre">1.0</span></tt> </td>774 <td><tt class="docutils literal"><span class="pre">1.0</span></tt> (seconds)</td> 728 775 </tr> 729 776 <tr><td>fps</td> … … 731 778 </tr> 732 779 <tr><td>sync</td> 733 <td><tt class="docutils literal"><span class="pre">false</span></tt> </td>780 <td><tt class="docutils literal"><span class="pre">false</span></tt> (only set for <a class="mochiref reference" href="#fn-parallel">Parallel</a> effects)</td> 734 781 </tr> 735 782 <tr><td>from</td> … … 758 805 <p>Base class to all effects. Define a basic looping service, use it 759 806 for creating new effects.</p> 760 <p>You can override the methods <tt class="docutils literal"><span class="pre">setup</span></tt>, <tt class="docutils literal"><span class="pre">update</span></tt> and <tt class="docutils literal"><span class="pre">finish `</span></tt>.</p>807 <p>You can override the methods <tt class="docutils literal"><span class="pre">setup</span></tt>, <tt class="docutils literal"><span class="pre">update</span></tt> and <tt class="docutils literal"><span class="pre">finish</span></tt>.</p> 761 808 <p>The class defines a number of events that will be called during effect 762 809 life. The events are:</p> mochikit/trunk/doc/rst/MochiKit/Visual.rst
r1341 r1342 456 456 off by default. See also the :mochiref:`DefaultOptions`. 457 457 458 ================= ============================================459 ``direction`` ``center``460 ``moveTransition````MochiKit.Visual.Transitions.sinoidal``461 ``scaleTransition````MochiKit.Visual.Transitions.sinoidal``462 ``opacityTransition````MochiKit.Visual.Transitions.full``463 ================= ============================================458 ================= ======================================== 459 direction ``"center"`` 460 moveTransition ``MochiKit.Visual.Transitions.sinoidal`` 461 scaleTransition ``MochiKit.Visual.Transitions.sinoidal`` 462 opacityTransition ``MochiKit.Visual.Transitions.full`` 463 ================= ======================================== 464 464 465 465 The ``direction`` option controls the origin point of the effect. … … 467 467 468 468 ===================== ======================================== 469 `` center``Grows from the center470 `` top-left``Grows from the top left corner471 `` top-right``Grows from the top right corner472 `` bottom-left``Grows from the bottom left corner473 `` bottom-right``Grows from the bottom right corner469 ``"center"`` Grows from the center 470 ``"top-left"`` Grows from the top left corner 471 ``"top-right"`` Grows from the top right corner 472 ``"bottom-left"`` Grows from the bottom left corner 473 ``"bottom-right"`` Grows from the bottom right corner 474 474 ===================== ======================================== 475 475 … … 496 496 off by default. See also the :mochiref:`DefaultOptions`. 497 497 498 ================= ============================================499 ``direction`` ``center``500 ``moveTransition````MochiKit.Visual.Transitions.sinoidal``501 ``scaleTransition````MochiKit.Visual.Transitions.sinoidal``502 ``opacityTransition`` ``MochiKit.Visual.Transitions.none``503 ================= ============================================498 ================= ======================================== 499 direction ``"center"`` 500 moveTransition ``MochiKit.Visual.Transitions.sinoidal`` 501 scaleTransition ``MochiKit.Visual.Transitions.sinoidal`` 502 opacityTransition ``MochiKit.Visual.Transitions.full`` 503 ================= ======================================== 504 504 505 505 The ``direction`` option controls the destination point of the … … 507 507 508 508 ===================== ======================================== 509 `` center`` Shrinks tothe center510 `` top-left`` Shrinks tothe top left corner511 `` top-right`` Shrinks tothe top right corner512 `` bottom-left`` Shrinks tothe bottom left corner513 `` bottom-right`` Shrinks tothe bottom right corner509 ``"center"`` Grows from the center 510 ``"top-left"`` Grows from the top left corner 511 ``"top-right"`` Grows from the top right corner 512 ``"bottom-left"`` Grows from the bottom left corner 513 ``"bottom-right"`` Grows from the bottom right corner 514 514 ===================== ======================================== 515 515 … … 565 565 --------------------- 566 566 567 :mochidef:`Transitions`: 568 569 Default transition functions available for all effects. A transition 570 function adjusts the current position value between 0 and 1 in order 571 to achieve a non-linear sequence of position values for the effect. 572 573 =========== ======================================== 574 linear A straight linear transition. 575 sinoidal A smooth sine value transition. 576 reverse A reverse linear transition. 577 flicker A sine transition with random additions. 578 wobble A multi-period sine curve transition. 579 pulse A multi-period triangle curve transition. 580 none A fixed zero (0) value transition. 581 full A fixed one (1) value transition. 582 =========== ======================================== 583 584 *Availability*: 585 Available in MochiKit 1.4+ 586 587 567 588 :mochidef:`DefaultOptions`: 568 589 569 Default options for all Effect creation. 590 Default options for all effects. Note that all effects inherit 591 the :mochiref:`Base` class and thereby also support a number of 592 events, that can be specified as callback functions among the 593 effect options. 570 594 571 595 =========== ======================================== 572 596 transition ``MochiKit.Visual.Transitions.sinoidal`` 573 duration ``1.0`` 597 duration ``1.0`` (seconds) 574 598 fps ``25.0`` 575 sync ``false`` 599 sync ``false`` (only set for :mochiref:`Parallel` effects) 576 600 from ``0.0`` 577 601 to ``1.0`` … … 589 613 for creating new effects. 590 614 591 You can override the methods ``setup``, ``update`` and ``finish`` `.615 You can override the methods ``setup``, ``update`` and ``finish``. 592 616 593 617 The class defines a number of events that will be called during effect
