Project

General

Profile

« Previous | Next » 

Revision e0a16874

Added by Leszek Koltunski over 8 years ago

cleanup in DistortedObject's methods.

View differences:

src/main/java/org/distorted/library/DistortedObject.java
29 29
 */
30 30
public abstract class DistortedObject 
31 31
{
32
    private static float[] mViewMatrix = new float[16];
32
    private static final Float2D mZero2D = new Float2D(0,0);
33
    private static final Float3D mZero3D = new Float3D(0,0,0);
34

  
35
    private static float[] mViewMatrix   = new float[16];
33 36
   
34 37
    protected EffectQueueMatrix    mM;
35 38
    protected EffectQueueFragment  mF;
......
468 471
/**
469 472
 * Moves the Object by a vector that changes in time as interpolated by the Interpolator.
470 473
 * 
471
 * @param di 3-dimensional Interpolator which at any given time will return a Float3D
472
 *           representing the current coordinates of the vector we want to move the Object with.
473
 * @return   ID of the effect added, or -1 if we failed to add one. 
474
 * @param vector 3-dimensional Interpolator which at any given time will return a Float3D
475
 *               representing the current coordinates of the vector we want to move the Object with.
476
 * @return       ID of the effect added, or -1 if we failed to add one.
474 477
 */
475
  public long move(Interpolator3D di)
478
  public long move(Interpolator3D vector)
476 479
    {   
477
    return mM.add(EffectNames.MOVE,null,di);  
480
    return mM.add(EffectNames.MOVE,vector);
478 481
    }
479 482

  
480 483
///////////////////////////////////////////////////////////////////////////////////////////////////
481 484
/**
482
 * Moves the Bitmap by a vector that smoothly changes from (0,0,0) to (x,y,z).
485
 * Moves the Object by a vector that smoothly changes from (0,0,0) to (x,y,z).
483 486
 *  
484 487
 * @param x        The x-coordinate of the vector we want to move the Object with. 
485 488
 * @param y        The y-coordinate of the vector we want to move the Object with.
......
495 498
    di.add(new Float3D(0.0f,0.0f,0.0f));                             
496 499
    di.add(new Float3D(x,y,z));                        
497 500

  
498
    return mM.add(EffectNames.MOVE,null,di);  
501
    return mM.add(EffectNames.MOVE,di);
499 502
    }
500 503

  
501 504
///////////////////////////////////////////////////////////////////////////////////////////////////
502 505
/**
503
 * Moves the Bitmap by vector (x,y,z) immediately.
506
 * Moves the Object by vector (x,y,z) immediately.
504 507
 *   
505 508
 * @param x The x-coordinate of the vector we want to move the Object with. 
506 509
 * @param y The y-coordinate of the vector we want to move the Object with.
......
509 512
 */
510 513
  public long move(float x,float y,float z)
511 514
    {   
512
    return mM.add(EffectNames.MOVE,0.0f,0.0f,0.0f,x,y,z,0.0f);  
515
    return mM.add(EffectNames.MOVE,mZero3D,x,y,z,0.0f);
513 516
    }
514 517

  
515 518
///////////////////////////////////////////////////////////////////////////////////////////////////
......
517 520
/**
518 521
 * Scales the Object by factors that change in time as returned by the Interpolator.
519 522
 * 
520
 * @param di 3-dimensional Interpolator which at any given time returns a Float3D
521
 *           representing the current x- , y- and z- scale factors.
522
 * @return   ID of the effect added, or -1 if we failed to add one. 
523
 * @param scale 3-dimensional Interpolator which at any given time returns a Float3D
524
 *              representing the current x- , y- and z- scale factors.
525
 * @return      ID of the effect added, or -1 if we failed to add one.
523 526
 */
524
  public long scale(Interpolator3D di)
527
  public long scale(Interpolator3D scale)
525 528
    {   
526
    return mM.add(EffectNames.SCALE,null,di);  
529
    return mM.add(EffectNames.SCALE,scale);
527 530
    }
528 531

  
529 532
///////////////////////////////////////////////////////////////////////////////////////////////////
......
546 549
    di.add(new Float3D(1.0f,1.0f,1.0f));                             
547 550
    di.add(new Float3D(xscale,yscale,zscale));                        
548 551

  
549
    return mM.add(EffectNames.SCALE,null,di);  
552
    return mM.add(EffectNames.SCALE,di);
550 553
    }
551 554

  
552 555
///////////////////////////////////////////////////////////////////////////////////////////////////
......
561 564
 */
562 565
  public long scale(float xscale,float yscale,float zscale)
563 566
    {   
564
    return mM.add(EffectNames.SCALE,0.0f,0.0f,0.0f,xscale,yscale,zscale,0.0f);  
567
    return mM.add(EffectNames.SCALE,mZero3D,xscale,yscale,zscale,0.0f);
565 568
    }
566 569

  
567 570
///////////////////////////////////////////////////////////////////////////////////////////////////
......
574 577
 */
575 578
  public long scale(float scale)
576 579
    {   
577
    return mM.add(EffectNames.SCALE,0.0f,0.0f,0.0f,scale,scale,scale,0.0f);  
580
    return mM.add(EffectNames.SCALE,mZero3D,scale,scale,scale,0.0f);
578 581
    }
579 582
    
580 583
///////////////////////////////////////////////////////////////////////////////////////////////////
......
582 585
/**
583 586
 * Rotates the Object around a (possibly moving) point, with angle and axis that change in time.
584 587
 * 
585
 * @param i 3-dimensional Interpolator which at any given time will return the current center of 
586
 *          the rotation
587
 * @param v 4-dimensional Interpolator which at any given time will return a Float4D
588
 *          representing the current rotation in the (angle,axisX,axisY,axisY) form. 
589
 * @return  ID of the effect added, or -1 if we failed to add one. 
588
 * @param center    3-dimensional Interpolator which at any given time will return the current center
589
 *                  of the rotation
590
 * @param angleAxis 4-dimensional Interpolator which at any given time will return a Float4D
591
 *                  representing the current rotation in the (angle,axisX,axisY,axisY) form.
592
 * @return          ID of the effect added, or -1 if we failed to add one.
590 593
 */
591
  public long rotate(Interpolator3D i, Interpolator4D v)
594
  public long rotate(Interpolator3D center, Interpolator4D angleAxis)
592 595
    {   
593
    return mM.add(EffectNames.ROTATE, i, v);  
596
    return mM.add(EffectNames.ROTATE, center, angleAxis);
594 597
    }
595 598

  
596 599
///////////////////////////////////////////////////////////////////////////////////////////////////  
597 600
/**
598 601
 * Rotates the Object around a static point, with angle and axis that change in time.
599 602
 * 
600
 * @param point Center of the rotation
601
 * @param v     4-dimensional Interpolator which at any given time will return a Float4D
602
 *              representing the current rotation in the (angle,axisX,axisY,axisY) form. 
603
 * @return      ID of the effect added, or -1 if we failed to add one. 
603
 * @param center    Center of the rotation
604
 * @param angleAxis 4-dimensional Interpolator which at any given time will return a Float4D
605
 *                  representing the current rotation in the (angle,axisX,axisY,axisY) form.
606
 * @return          ID of the effect added, or -1 if we failed to add one.
604 607
 */
605
  public long rotate(Float3D point, Interpolator4D v)
608
  public long rotate(Float3D center, Interpolator4D angleAxis)
606 609
    {   
607
    return mM.add(EffectNames.ROTATE, point.x, point.y, point.z , v);  
610
    return mM.add(EffectNames.ROTATE, center , angleAxis);
608 611
    }
609 612
  
610 613
///////////////////////////////////////////////////////////////////////////////////////////////////  
......
612 615
 * Rotates the Object around a static point, with angle that changes in time, around axis 
613 616
 * (axisX, axisY, axisZ). 
614 617
 * 
615
 * @param point Center of the rotation
616
 * @param v     1-dimensional Interpolator which at any given time will return the current rotation 
617
 *              angle.
618
 * @param axisX Rotation vector: x-coordinate
619
 * @param axisY Rotation vector: y-coordinate         
620
 * @param axisZ Rotation vector: z-coordinate         
621
 * @return      ID of the effect added, or -1 if we failed to add one. 
622
 */
623
  public long rotate(Float3D point, Interpolator1D v, float axisX, float axisY, float axisZ)
618
 * @param center Center of the rotation
619
 * @param angle  1-dimensional Interpolator which at any given time will return the current rotation
620
 *               angle.
621
 * @param axisX  Rotation vector: x-coordinate
622
 * @param axisY  Rotation vector: y-coordinate
623
 * @param axisZ  Rotation vector: z-coordinate
624
 * @return       ID of the effect added, or -1 if we failed to add one.
625
 */
626
  public long rotate(Float3D center, Interpolator1D angle, float axisX, float axisY, float axisZ)
624 627
    {   
625
    return mM.add(EffectNames.ROTATE, point.x, point.y, point.z , v, axisX, axisY, axisZ);  
628
    return mM.add(EffectNames.ROTATE, center , angle, axisX, axisY, axisZ);
626 629
    }
627 630
  
628 631
///////////////////////////////////////////////////////////////////////////////////////////////////
......
630 633
 * Rotates the Object around a (possibly moving) point, with angle that changes in time.
631 634
 * Axis of rotation is the vector (0,0,1), i.e. a vector normal to the screen surface.
632 635
 * 
633
 * @param i 3-dimensional Interpolator which at any given time will return the current center
634
 *          of the rotation.
635
 * @param a 1-dimensional Interpolator which returns the current rotation angle.         
636
 * @return  ID of the effect added, or -1 if we failed to add one. 
636
 * @param center 3-dimensional Interpolator which at any given time will return the current center
637
 *               of the rotation.
638
 * @param angle  1-dimensional Interpolator which returns the current rotation angle.
639
 * @return       ID of the effect added, or -1 if we failed to add one.
637 640
 */
638
  public long rotate(Interpolator3D i, Interpolator1D a)
641
  public long rotate(Interpolator3D center, Interpolator1D angle)
639 642
    {   
640
    return mM.add(EffectNames.ROTATE, i, a, 0.0f,0.0f,1.0f);  
643
    return mM.add(EffectNames.ROTATE, center, angle, 0.0f,0.0f,1.0f);
641 644
    }
642 645

  
643 646
///////////////////////////////////////////////////////////////////////////////////////////////////
......
645 648
 * Rotates the Object around a constant point, with angle that changes in time.  
646 649
 * Axis of rotation is the vector (0,0,1), i.e. a vector normal to the screen surface.
647 650
 *   
648
 * @param point    Coordinates of the Point we are rotating around.
651
 * @param center   Coordinates of the Point we are rotating around.
649 652
 * @param angle    Angle that we want to rotate the Bitmap to. Unit: degrees
650 653
 * @param duration Time, in milliseconds, it takes to complete one rotation from 0 to 'angle' degrees.
651 654
 * @return         ID of the effect added, or -1 if we failed to add one. 
652 655
 */
653
  public long rotate(Float3D point, int angle, int duration)
656
  public long rotate(Float3D center, int angle, int duration)
654 657
    {   
655 658
    Interpolator1D di = new Interpolator1D();  
656 659
    di.setCount(0.5f);
......
658 661
    di.add(new Float1D(    0));                             
659 662
    di.add(new Float1D(angle));                        
660 663

  
661
    return mM.add(EffectNames.ROTATE,point.x,point.y,point.z, di, 0.0f,0.0f,1.0f);  
664
    return mM.add(EffectNames.ROTATE, center, di, 0.0f,0.0f,1.0f);
662 665
    }
663 666

  
664 667
///////////////////////////////////////////////////////////////////////////////////////////////////
......
666 669
 * Rotates the Object immediately by 'angle' degrees around point p.   
667 670
 * Axis of rotation is given by the last 3 floats.
668 671
 *   
669
 * @param point Coordinates of the Point we are rotating around.
670
 * @param angle Angle that we want to rotate the Bitmap to. Unit: degrees
671
 * @param axisX Axis of rotation: x-coordinate
672
 * @param axisY Axis of rotation: y-coordinate
673
 * @param axisZ Axis of rotation: z-coordinate
674
 * @return      ID of the effect added, or -1 if we failed to add one. 
675
 */
676
  public long rotate(Float3D point, float angle, float axisX, float axisY, float axisZ)
672
 * @param center Coordinates of the Point we are rotating around.
673
 * @param angle  Angle that we want to rotate the Bitmap to. Unit: degrees
674
 * @param axisX  Axis of rotation: x-coordinate
675
 * @param axisY  Axis of rotation: y-coordinate
676
 * @param axisZ  Axis of rotation: z-coordinate
677
 * @return       ID of the effect added, or -1 if we failed to add one.
678
 */
679
  public long rotate(Float3D center, float angle, float axisX, float axisY, float axisZ)
677 680
    {   
678
    return mM.add(EffectNames.ROTATE, point.x, point.y, point.z, angle, axisX, axisY, axisZ);  
681
    return mM.add(EffectNames.ROTATE, center, angle, axisX, axisY, axisZ);
679 682
    }
680 683
  
681 684
///////////////////////////////////////////////////////////////////////////////////////////////////
682 685
/**
683 686
 * Rotates the Object immediately by 'angle' degrees around point p.   
684 687
 *   
685
 * @param point  Coordinates of the Point we are rotating around.
688
 * @param center Coordinates of the Point we are rotating around.
686 689
 * @param angle  The angle that we want to rotate the Bitmap to. Unit: degrees
687 690
 * @return       ID of the effect added, or -1 if we failed to add one. 
688 691
 */
689
  public long rotate(Float3D point, int angle)
692
  public long rotate(Float3D center, int angle)
690 693
    {   
691
    return mM.add(EffectNames.ROTATE,point.x,point.y,point.z,angle,0.0f,0.0f,1.0f);  
694
    return mM.add(EffectNames.ROTATE, center, angle,0.0f,0.0f,1.0f);
692 695
    }
693 696

  
694 697
///////////////////////////////////////////////////////////////////////////////////////////////////
......
696 699
/**
697 700
 * Rotates the Object immediately by quaternion (qX,qY,qZ,qW).
698 701
 *   
699
 * @param point Coordinates of the Point we are rotating around.
700
 * @param qX    Quaternion: x-coordinate
701
 * @param qY    Quaternion: y-coordinate
702
 * @param qZ    Quaternion: z-coordinate
703
 * @param qW    Quaternion: w-coordinate
704
 * @return      ID of the effect added, or -1 if we failed to add one. 
705
 */
706
  public long quaternion(Float3D point, float qX, float qY, float qZ, float qW)
702
 * @param center Coordinates of the Point we are rotating around.
703
 * @param qX     Quaternion: x-coordinate
704
 * @param qY     Quaternion: y-coordinate
705
 * @param qZ     Quaternion: z-coordinate
706
 * @param qW     Quaternion: w-coordinate
707
 * @return       ID of the effect added, or -1 if we failed to add one.
708
 */
709
  public long quaternion(Float3D center, float qX, float qY, float qZ, float qW)
707 710
    {   
708
    return mM.add(EffectNames.QUATERNION,point.x,point.y,point.z,qX,qY,qZ,qW);   
711
    return mM.add(EffectNames.QUATERNION,center,qX,qY,qZ,qW);
709 712
    }
710 713

  
711 714
///////////////////////////////////////////////////////////////////////////////////////////////////
712 715
/**
713 716
 * Rotates the Object by a quaternion that's at the moment returned by the InterpolatorQuat.
714 717
 *   
715
 * @param point Coordinates of the Point we are rotating around.
716
 * @param iq    Interpolator that's going to, at any given moment, return a quaternion.
717
 * @return      ID of the effect added, or -1 if we failed to add one. 
718
 * @param center Coordinates of the Point we are rotating around.
719
 * @param quat   Interpolator that's going to, at any given moment, return a quaternion.
720
 * @return       ID of the effect added, or -1 if we failed to add one.
718 721
 */
719
  public long quaternion(Float3D point, InterpolatorQuat iq)
722
  public long quaternion(Float3D center, InterpolatorQuat quat)
720 723
    {   
721
    return mM.add(EffectNames.QUATERNION,point.x,point.y,point.z,iq);  
724
    return mM.add(EffectNames.QUATERNION, center, quat);
722 725
    }
723 726

  
724 727
///////////////////////////////////////////////////////////////////////////////////////////////////
725 728
/**
726 729
 * Rotates the Object around a moving point by a quaternion that's at the moment returned by the InterpolatorQuat.
727 730
 *   
728
 * @param i  Interpolator that returns the current center of rotation.
729
 * @param iq Interpolator that's going to, at any given moment, return a quaternion representing the current rotation.
730
 * @return   ID of the effect added, or -1 if we failed to add one. 
731
 * @param center Interpolator that returns the current center of rotation.
732
 * @param quat   Interpolator that's going to, at any given moment, return a quaternion representing
733
 *               the current rotation.
734
 * @return       ID of the effect added, or -1 if we failed to add one.
731 735
 */
732
  public long quaternion(Interpolator3D i, InterpolatorQuat iq)
736
  public long quaternion(Interpolator3D center, InterpolatorQuat quat)
733 737
    {   
734
    return mM.add(EffectNames.QUATERNION,i,iq);  
738
    return mM.add(EffectNames.QUATERNION,center,quat);
735 739
    }
736 740
  
737 741
///////////////////////////////////////////////////////////////////////////////////////////////////
......
740 744
 * Shears the Object. If the Interpolator is 1D, it will shear along the X-axis. 2D Interpolator adds
741 745
 * shearing along the Y-axis, 3D one along Z axis.
742 746
 *
743
 * @param point  Center of shearing, i.e. the point which stays unmoved. 
744
 * @param di     1- 2- or 3D Interpolator which, at any given point, returns the ordered 1-, 2- 
745
 *               or 3-tuple of shear factors.
746
 * @return       ID of the effect added, or -1 if we failed to add one. 
747
 * @param center  Center of shearing, i.e. the point which stays unmoved.
748
 * @param shear   1- 2- or 3D Interpolator which, at any given point, returns the ordered 1-, 2-
749
 *                or 3-tuple of shear factors.
750
 * @return        ID of the effect added, or -1 if we failed to add one.
747 751
 */
748
  public long shear(Float3D point, Interpolator di)
752
  public long shear(Float3D center, Interpolator shear)
749 753
    {
750
    return mM.add(EffectNames.SHEAR, point.x, point.y, point.z, di);  
754
    return mM.add(EffectNames.SHEAR, center, shear);
751 755
    }
752 756

  
753 757
///////////////////////////////////////////////////////////////////////////////////////////////////
754 758
/**
755 759
 * Shears the Object in 3D. Order: first X shearing, then Y, then Z.
756 760
 * 
757
 * @param point  Center of shearing, i.e. the point which stays unmoved. 
758
 * @param vector ordered 3-tuple (x-degree, y-degree, z-degree) of shearing (tangent of the angle with 
761
 * @param center Center of shearing, i.e. the point which stays unmoved.
762
 * @param shear  ordered 3-tuple (x-degree, y-degree, z-degree) of shearing (tangent of the angle with
759 763
 *               which the X,Y and Z axis get slanted) 
760 764
 * @return       ID of the effect added, or -1 if we failed to add one. 
761 765
 */
762
  public long shear(Float3D point, Float3D vector)
766
  public long shear(Float3D center, Float3D shear)
763 767
    {
764 768
    Interpolator3D di = new Interpolator3D(); 
765 769
    di.setCount(0.5f);
766 770
    di.setDuration(0);
767 771
    di.add(new Float3D(0.0f,0.0f,0.0f));              
768
    di.add(vector);                                                
772
    di.add(shear);
769 773
        
770
    return mM.add(EffectNames.SHEAR, point.x, point.y, point.z, di );  
774
    return mM.add(EffectNames.SHEAR, center, di );
771 775
    }
772 776

  
773 777
///////////////////////////////////////////////////////////////////////////////////////////////////
......
778 782
 * Creates macroblocks at and around point defined by the Interpolator2D and the Region. 
779 783
 * Size of the macroblocks at any given time is returned by the Interpolator1D.
780 784
 * 
781
 * @param a      1-dimensional Interpolator which, at any given time, returns the size of the macroblocks.
785
 * @param size   1-dimensional Interpolator which, at any given time, returns the size of the macroblocks.
782 786
 * @param region Region this Effect is limited to.
783 787
 *               Null here means 'apply the effect to the whole Bitmap'.
784
 * @param i      2-dimensional Interpolator which, at any given time, returns a Float2D representing the
788
 * @param center 2-dimensional Interpolator which, at any given time, returns a Float2D representing the
785 789
 *               current center of the effect.
786 790
 * @return       ID of the effect added, or -1 if we failed to add one. 
787 791
 */
788
  public long macroblock(Interpolator1D a, Float4D region, Interpolator2D i)
792
  public long macroblock(Interpolator1D size, Float4D region, Interpolator2D center)
789 793
    {
790
    return mF.add(EffectNames.MACROBLOCK, a, region, i);
794
    return mF.add(EffectNames.MACROBLOCK, size, region, center);
791 795
    }
792 796

  
793 797
///////////////////////////////////////////////////////////////////////////////////////////////////
......
797 801
 * <p>
798 802
 * The difference between this and the previous method is that here the center of the Effect stays constant.
799 803
 *    
800
 * @param a      1-dimensional Interpolator which, at any given time, returns the size of the macroblocks.
804
 * @param size   1-dimensional Interpolator which, at any given time, returns the size of the macroblocks.
801 805
 * @param region Region this Effect is limited to. 
802 806
 *               Null here means 'apply the effect to the whole Bitmap'.
803
 * @param point  Center of the Effect.
807
 * @param center Center of the Effect.
804 808
 * @return       ID of the effect added, or -1 if we failed to add one. 
805 809
 */
806
  public long macroblock(Interpolator1D a, Float4D region, Float2D point)
810
  public long macroblock(Interpolator1D size, Float4D region, Float2D center)
807 811
    {
808
    return mF.add(EffectNames.MACROBLOCK, a, region, point.x, point.y);
812
    return mF.add(EffectNames.MACROBLOCK, size, region, center);
809 813
    }
810 814
  
811 815
///////////////////////////////////////////////////////////////////////////////////////////////////
......
819 823
 * @param pixels   Maximum size, in pixels, of the Macroblocks we want to see.
820 824
 * @param region   Region this Effect is limited to. 
821 825
 *                 Null here means 'apply the effect to the whole Bitmap'.
822
 * @param i        2-dimensional Interpolator which, at any given time, returns a Float2D representing the
826
 * @param center   2-dimensional Interpolator which, at any given time, returns a Float2D representing the
823 827
 *                 current center of the effect.
824 828
 * @param duration Time, in milliseconds, it takes to do one full interpolation.
825 829
 * @param count    Controls how many interpolations we want to do. See {@link Interpolator#setCount(float)}
826 830
 * @return         ID of the effect added, or -1 if we failed to add one. 
827 831
 */
828
  public long macroblock(int pixels, Float4D region, Interpolator2D i, int duration, float count)
832
  public long macroblock(int pixels, Float4D region, Interpolator2D center, int duration, float count)
829 833
    {
830 834
    Interpolator1D di = new Interpolator1D();
831 835
    di.setCount(count);
......
833 837
    di.add(new Float1D(1));                             
834 838
    di.add(new Float1D(pixels));                        
835 839

  
836
    return mF.add(EffectNames.MACROBLOCK, di, region, i);
840
    return mF.add(EffectNames.MACROBLOCK, di, region, center);
837 841
    }
838 842

  
839 843
///////////////////////////////////////////////////////////////////////////////////////////////////
......
849 853
 * @param pixels   Maximum size, in pixels, of the Macroblocks we want to see.
850 854
 * @param region   Region this Effect is limited to. 
851 855
 *                 Null here means 'apply the effect to the whole Bitmap'.
852
 * @param point    Center of the Effect.
856
 * @param center   Center of the Effect.
853 857
 * @param duration Time, in milliseconds, it takes to do one full interpolation.
854 858
 * @param count    Controls how many interpolations we want to do. See {@link Interpolator#setCount(float)}
855 859
 * @return         ID of the effect added, or -1 if we failed to add one. 
856 860
 */
857
  public long macroblock(int pixels, Float4D region, Float2D point, int duration, float count)
861
  public long macroblock(int pixels, Float4D region, Float2D center, int duration, float count)
858 862
    {
859 863
    Interpolator1D di = new Interpolator1D();
860 864
    di.setCount(count);
......
862 866
    di.add(new Float1D(1));                             
863 867
    di.add(new Float1D(pixels));                        
864 868

  
865
    return mF.add(EffectNames.MACROBLOCK, di, region, point.x, point.y);
869
    return mF.add(EffectNames.MACROBLOCK, di, region, center);
866 870
    }
867 871

  
868 872
///////////////////////////////////////////////////////////////////////////////////////////////////
869 873
/**
870
 * Creates macroblocks on the whole Bitmap. 
874
 * Creates macroblocks on the whole Object.
871 875
 * <p>
872 876
 * The macroblocks change in size; at time 0 there are none, and after 'duration/2' milliseconds 
873 877
 * they are of (pixels X pixels) size; after 'duration' milliseconds there are again none (i.e. their
......
889 893
    di.add(new Float1D(1));                            
890 894
    di.add(new Float1D(pixels));                        
891 895
   
892
    return mF.add(EffectNames.MACROBLOCK, di, null, 0.0f, 0.0f);
896
    return mF.add(EffectNames.MACROBLOCK, di, null, mZero2D);
893 897
    }
894 898

  
895 899
///////////////////////////////////////////////////////////////////////////////////////////////////
896 900
///////////////////////////////////////////////////////////////////////////////////////////////////
897 901
// CHROMA
898 902
/**
899
 * Makes a certain sub-region of the Bitmap smoothly change all three of its RGB components.
903
 * Makes a certain sub-region of the Object smoothly change all three of its RGB components.
900 904
 *        
901
 * @param t      1-dimensional Interpolator that returns the level of blend a given pixel will be
905
 * @param blend  1-dimensional Interpolator that returns the level of blend a given pixel will be
902 906
 *               mixed with the next parameter 'color': pixel = (1-level)*pixel + level*color
903 907
 * @param color  Color to mix. (1,0,0) is RED.
904 908
 * @param region Region this Effect is limited to. 
905 909
 *               Null here means 'apply the Effect to the whole Bitmap'.
906
 * @param i      2-dimensional Interpolator which, at any given time, returns a Float2D representing 
910
 * @param center 2-dimensional Interpolator which, at any given time, returns a Float2D representing
907 911
 *               the current center of the effect.
908 912
 * @return       ID of the effect added, or -1 if we failed to add one. 
909 913
 */
910
  public long chroma(Interpolator1D t, Float3D color, Float4D region, Interpolator2D i)
914
  public long chroma(Interpolator1D blend, Float3D color, Float4D region, Interpolator2D center)
911 915
    {
912
    return mF.add(EffectNames.CHROMA, t, color, region, i);
916
    return mF.add(EffectNames.CHROMA, blend, color, region, center);
913 917
    }
914 918

  
915 919
///////////////////////////////////////////////////////////////////////////////////////////////////
916 920
/**
917
 * Makes a certain sub-region of the Bitmap smoothly change all three of its RGB components.
921
 * Makes a certain sub-region of the Object smoothly change all three of its RGB components.
918 922
 * <p>
919 923
 * Here the center of the Effect stays constant.
920 924
 *         
921
 * @param t      1-dimensional Interpolator that returns the level of blend a given pixel will be 
925
 * @param blend  1-dimensional Interpolator that returns the level of blend a given pixel will be
922 926
 *               mixed with the next parameter 'color': pixel = (1-level)*pixel + level*color
923 927
 * @param color  Color to mix. (1,0,0) is RED.
924 928
 * @param region Region this Effect is limited to. 
925 929
 *               Null here means 'apply the Effect to the whole Bitmap'.
926
 * @param point  Center of the Effect.
930
 * @param center Center of the Effect.
927 931
 * @return       ID of the effect added, or -1 if we failed to add one. 
928 932
 */
929
  public long chroma(Interpolator1D t, Float3D color, Float4D region, Float2D point)
933
  public long chroma(Interpolator1D blend, Float3D color, Float4D region, Float2D center)
930 934
    {
931
    return mF.add(EffectNames.CHROMA, t, color, region, point.x, point.y);
935
    return mF.add(EffectNames.CHROMA, blend, color, region, center);
932 936
    }
933 937

  
934 938
///////////////////////////////////////////////////////////////////////////////////////////////////  
935 939
/**
936
 * Makes a certain sub-region of the Bitmap smoothly change all three of its RGB components.
940
 * Makes a certain sub-region of the Object smoothly change all three of its RGB components.
937 941
 *        
938
 * @param t      Level of blend a given pixel will be mixed with the next parameter 'color': 
942
 * @param blend  Level of blend a given pixel will be mixed with the next parameter 'color':
939 943
 *               pixel = (1-t)*pixel + t*color
940 944
 * @param color  Color to mix. (1,0,0) is RED.
941 945
 * @param region Region this Effect is limited to.
942 946
 *               Null here means 'apply the Effect to the whole Bitmap'.
943
 * @param i      2-dimensional Interpolator which, at any given time, returns a Float2D representing the
947
 * @param center 2-dimensional Interpolator which, at any given time, returns a Float2D representing the
944 948
 *               current center of the effect.
945 949
 * @return       ID of the effect added, or -1 if we failed to add one. 
946 950
 */
947
  public long chroma(float t, Float3D color, Float4D region, Interpolator2D i)
951
  public long chroma(float blend, Float3D color, Float4D region, Interpolator2D center)
948 952
    {
949
    return mF.add(EffectNames.CHROMA, t, color, region, i);
953
    return mF.add(EffectNames.CHROMA, blend, color, region, center);
950 954
    }
951 955

  
952 956
///// //////////////////////////////////////////////////////////////////////////////////////////////
953 957
/**
954
 * Makes a certain sub-region of the Bitmap smoothly change all three of its RGB components.
958
 * Makes a certain sub-region of the Object smoothly change all three of its RGB components.
955 959
 * <p>
956 960
 * Here the center of the Effect stays constant.
957 961
 *         
958
 * @param t      Level of blend a given pixel will be mixed with the next parameter 'color': 
962
 * @param blend  Level of blend a given pixel will be mixed with the next parameter 'color':
959 963
 *               pixel = (1-t)*pixel + t*color
960 964
 * @param color  Color to mix. (1,0,0) is RED.
961 965
 * @param region The Region this Effect is limited to. 
962 966
 *               Null here means 'apply the Effect to the whole Bitmap'.
963
 * @param point  Center of the Effect.
967
 * @param center Center of the Effect.
964 968
 * @return       ID of the effect added, or -1 if we failed to add one. 
965 969
 */
966
  public long chroma(float t, Float3D color, Float4D region, Float2D point)
970
  public long chroma(float blend, Float3D color, Float4D region, Float2D center)
967 971
    {
968
    return mF.add(EffectNames.CHROMA, t, color, region, point.x, point.y);
972
    return mF.add(EffectNames.CHROMA, blend, color, region, center);
969 973
    }
970 974

  
971 975
///////////////////////////////////////////////////////////////////////////////////////////////////
972 976
/**
973
 * Makes a certain sub-region of the Bitmap smoothly change all three of its RGB components.
977
 * Makes a certain sub-region of the Object smoothly change all three of its RGB components.
974 978
 * <p>
975 979
 * Here the Effect applies to the whole bitmap.
976 980
 *         
977
 * @param t     Level of blend a given pixel will be mixed with the next parameter 'color': 
981
 * @param blend Level of blend a given pixel will be mixed with the next parameter 'color':
978 982
 *              pixel = (1-t)*pixel + t*color
979 983
 * @param color Color to mix. (1,0,0) is RED.
980 984
 * @return      ID of the effect added, or -1 if we failed to add one. 
981 985
 */
982
  public long chroma(float t, Float3D color)
986
  public long chroma(float blend, Float3D color)
983 987
    {
984
    return mF.add(EffectNames.CHROMA, t, color, null, 0, 0);
988
    return mF.add(EffectNames.CHROMA, blend, color, null, mZero2D);
985 989
    }
986 990

  
987 991
///////////////////////////////////////////////////////////////////////////////////////////////////  
988 992
/**
989
 * Makes a certain sub-region of the Bitmap smoothly change all three of its RGB components.
993
 * Makes a certain sub-region of the Object smoothly change all three of its RGB components.
990 994
 * 
991 995
 * See {@link #chroma(Interpolator1D, Float3D, Float4D, Interpolator2D)}
992 996
 */
993
  public long smooth_chroma(Interpolator1D t, Float3D color, Float4D region, Interpolator2D i)
997
  public long smooth_chroma(Interpolator1D blend, Float3D color, Float4D region, Interpolator2D center)
994 998
    {
995
    return mF.add(EffectNames.SMOOTH_CHROMA, t, color, region, i);
999
    return mF.add(EffectNames.SMOOTH_CHROMA, blend, color, region, center);
996 1000
    }
997 1001

  
998 1002
///////////////////////////////////////////////////////////////////////////////////////////////////
999 1003
/**
1000
 * Makes a certain sub-region of the Bitmap smoothly change all three of its RGB components.
1004
 * Makes a certain sub-region of the Object smoothly change all three of its RGB components.
1001 1005
 * 
1002 1006
 * See {@link #chroma(Interpolator1D, Float3D, Float4D, Float2D)}
1003 1007
 */
1004
  public long smooth_chroma(Interpolator1D t, Float3D color, Float4D region, Float2D point)
1008
  public long smooth_chroma(Interpolator1D blend, Float3D color, Float4D region, Float2D center)
1005 1009
    {
1006
    return mF.add(EffectNames.SMOOTH_CHROMA, t, color, region, point.x, point.y);
1010
    return mF.add(EffectNames.SMOOTH_CHROMA, blend, color, region, center);
1007 1011
    }
1008 1012
  
1009 1013
///////////////////////////////////////////////////////////////////////////////////////////////////  
1010 1014
/**
1011
 * Makes a certain sub-region of the Bitmap smoothly change all three of its RGB components.
1015
 * Makes a certain sub-region of the Object smoothly change all three of its RGB components.
1012 1016
 * 
1013 1017
 * See {@link #chroma(float, Float3D, Float4D, Interpolator2D)}
1014 1018
 */
1015
  public long smooth_chroma(float t, Float3D color, Float4D region, Interpolator2D i)
1019
  public long smooth_chroma(float blend, Float3D color, Float4D region, Interpolator2D center)
1016 1020
    {
1017
    return mF.add(EffectNames.SMOOTH_CHROMA, t, color, region, i);
1021
    return mF.add(EffectNames.SMOOTH_CHROMA, blend, color, region, center);
1018 1022
    }
1019 1023

  
1020 1024
///////////////////////////////////////////////////////////////////////////////////////////////////
1021 1025
/**
1022
 * Makes a certain sub-region of the Bitmap smoothly change all three of its RGB components.
1026
 * Makes a certain sub-region of the Object smoothly change all three of its RGB components.
1023 1027
 * 
1024 1028
 * See {@link #chroma(float, Float3D, Float4D, Float2D)}
1025 1029
 */
1026
  public long smooth_chroma(float t, Float3D color, Float4D region, Float2D point)
1030
  public long smooth_chroma(float blend, Float3D color, Float4D region, Float2D center)
1027 1031
    {
1028
    return mF.add(EffectNames.SMOOTH_CHROMA, t, color, region, point.x, point.y);
1032
    return mF.add(EffectNames.SMOOTH_CHROMA, blend, color, region, center);
1029 1033
    }
1030 1034
  
1031 1035
///////////////////////////////////////////////////////////////////////////////////////////////////
1032 1036
/**
1033
 * Makes a certain sub-region of the Bitmap smoothly change all three of its RGB components.
1037
 * Makes a certain sub-region of the Object smoothly change all three of its RGB components.
1034 1038
 * 
1035 1039
 * See {@link #chroma(float, Float3D)}
1036 1040
 */
1037
  public long smooth_chroma(float t, Float3D color)
1041
  public long smooth_chroma(float blend, Float3D color)
1038 1042
    {
1039
    return mF.add(EffectNames.SMOOTH_CHROMA, t, color, null, 0, 0);
1043
    return mF.add(EffectNames.SMOOTH_CHROMA, blend, color, null, mZero2D);
1040 1044
    }
1041 1045
  
1042 1046
///////////////////////////////////////////////////////////////////////////////////////////////////
1043 1047
///////////////////////////////////////////////////////////////////////////////////////////////////
1044 1048
// ALPHA
1045 1049
/**
1046
 * Makes a certain sub-region of the Bitmap smoothly change its transparency level.
1050
 * Makes a certain sub-region of the Object smoothly change its transparency level.
1047 1051
 *        
1048
 * @param a      1-dimensional Interpolator that returns the level of transparency we want to have at any given 
1052
 * @param alpha  1-dimensional Interpolator that returns the level of transparency we want to have at any given
1049 1053
 *               moment.
1050 1054
 * @param region Region this Effect is limited to. 
1051
 *               Null here means 'apply the Effect to the whole Bitmap'.
1052
 * @param i      2-dimensional Interpolator which, at any given time, returns a Float2D representing the
1055
 *               Null here means 'apply the Effect to the whole Object'.
1056
 * @param center 2-dimensional Interpolator which, at any given time, returns a Float2D representing the
1053 1057
 *               current center of the effect.
1054 1058
 * @return       ID of the effect added, or -1 if we failed to add one. 
1055 1059
 */
1056
  public long alpha(Interpolator1D a, Float4D region, Interpolator2D i)
1060
  public long alpha(Interpolator1D alpha, Float4D region, Interpolator2D center)
1057 1061
    {
1058
    return mF.add(EffectNames.ALPHA, a, region, i);
1062
    return mF.add(EffectNames.ALPHA, alpha, region, center);
1059 1063
    }
1060 1064

  
1061 1065
///////////////////////////////////////////////////////////////////////////////////////////////////
1062 1066
/**
1063
 * Makes a certain sub-region of the Bitmap smoothly change its transparency level.
1067
 * Makes a certain sub-region of the Object smoothly change its transparency level.
1064 1068
 * <p>
1065 1069
 * Here the center of the Effect stays constant.
1066 1070
 *         
1067
 * @param a      1-dimensional Interpolator that returns the level of transparency we want to have at any given 
1071
 * @param alpha  1-dimensional Interpolator that returns the level of transparency we want to have at any given
1068 1072
 *               moment.
1069 1073
 * @param region Region this Effect is limited to. 
1070
 *               Null here means 'apply the Effect to the whole Bitmap'.
1071
 * @param point  Center of the Effect.
1074
 *               Null here means 'apply the Effect to the whole Object'.
1075
 * @param center Center of the Effect.
1072 1076
 * @return       ID of the effect added, or -1 if we failed to add one. 
1073 1077
 */
1074
  public long alpha(Interpolator1D a, Float4D region, Float2D point)
1078
  public long alpha(Interpolator1D alpha, Float4D region, Float2D center)
1075 1079
    {
1076
    return mF.add(EffectNames.ALPHA, a, region, point.x, point.y);
1080
    return mF.add(EffectNames.ALPHA, alpha, region, center);
1077 1081
    }
1078 1082

  
1079 1083
///////////////////////////////////////////////////////////////////////////////////////////////////  
1080 1084
/**
1081
 * Makes a certain sub-region of the Bitmap smoothly change its transparency level.
1085
 * Makes a certain sub-region of the Object smoothly change its transparency level.
1082 1086
 *        
1083 1087
 * @param alpha  Level of Alpha (between 0 and 1) we want to interpolate to.
1084 1088
 * @param region Region this Effect is limited to. 
1085
 *               Null here means 'apply the Effect to the whole Bitmap'.
1086
 * @param i      2-dimensional Interpolator which, at any given time, returns a Float2D representing the
1089
 *               Null here means 'apply the Effect to the whole Object'.
1090
 * @param center 2-dimensional Interpolator which, at any given time, returns a Float2D representing the
1087 1091
 *               current center of the effect.
1088 1092
 * @param duration Time, in milliseconds, it takes to do one full interpolation.
1089 1093
 * @param count  Controls how many interpolations we want to do. See {@link Interpolator#setCount(float)}
1090 1094
 * @return       ID of the effect added, or -1 if we failed to add one. 
1091 1095
 */
1092
  public long alpha(float alpha, Float4D region, Interpolator2D i, int duration, float count)
1096
  public long alpha(float alpha, Float4D region, Interpolator2D center, int duration, float count)
1093 1097
    {
1094 1098
    Interpolator1D di = new Interpolator1D(); 
1095 1099
    di.setCount(count);
......
1097 1101
    di.add(new Float1D(1));                          
1098 1102
    di.add(new Float1D(alpha));                         
1099 1103
   
1100
    return mF.add(EffectNames.ALPHA, di, region, i);
1104
    return mF.add(EffectNames.ALPHA, di, region, center);
1101 1105
    }
1102 1106

  
1103 1107
///////////////////////////////////////////////////////////////////////////////////////////////////
1104 1108
/**
1105
 * Makes a certain sub-region of the Bitmap smoothly change its transparency level.
1109
 * Makes a certain sub-region of the Object smoothly change its transparency level.
1106 1110
 * <p>
1107 1111
 * Here the center of the Effect stays constant.
1108 1112
 *         
1109
 * @param alpha  Level of Alpha (between 0 and 1) we want to interpolate to.
1110
 * @param region Region this Effect is limited to. 
1111
 *               Null here means 'apply the Effect to the whole Bitmap'.
1112
 * @param point  Center of the Effect.
1113
 * @param alpha    Level of Alpha (between 0 and 1) we want to interpolate to.
1114
 * @param region   Region this Effect is limited to.
1115
 *                 Null here means 'apply the Effect to the whole Object'.
1116
 * @param center   Center of the Effect.
1113 1117
 * @param duration Time, in milliseconds, it takes to do one full interpolation.
1114
 * @param count  Controls how many interpolations we want to do. See {@link Interpolator#setCount(float)}
1115
 * @return       ID of the effect added, or -1 if we failed to add one. 
1118
 * @param count    Controls how many interpolations we want to do. See {@link Interpolator#setCount(float)}
1119
 * @return         ID of the effect added, or -1 if we failed to add one.
1116 1120
 */
1117
  public long alpha(float alpha, Float4D region, Float2D point, int duration, float count)
1121
  public long alpha(float alpha, Float4D region, Float2D center, int duration, float count)
1118 1122
    {
1119 1123
    Interpolator1D di = new Interpolator1D(); 
1120 1124
    di.setCount(count);
......
1122 1126
    di.add(new Float1D(1));                          
1123 1127
    di.add(new Float1D(alpha));                         
1124 1128
   
1125
    return mF.add(EffectNames.ALPHA, di, region, point.x, point.y);
1129
    return mF.add(EffectNames.ALPHA, di, region, center);
1126 1130
    }
1127 1131

  
1128 1132
///////////////////////////////////////////////////////////////////////////////////////////////////
1129 1133
/**
1130
 * Makes a certain sub-region of the Bitmap smoothly change its transparency level.
1134
 * Makes a certain sub-region of the Object smoothly change its transparency level.
1131 1135
 * <p>
1132 1136
 * Here the center of the Effect stays constant and the effect for now change in time.
1133 1137
 *         
1134 1138
 * @param alpha  Level of Alpha (between 0 and 1) we want to interpolate to.
1135 1139
 * @param region Region this Effect is limited to.
1136
 *               Null here means 'apply the Effect to the whole Bitmap'.
1137
 * @param point  Center of the Effect.
1140
 *               Null here means 'apply the Effect to the whole Object'.
1141
 * @param center Center of the Effect.
1138 1142
 * @return       ID of the effect added, or -1 if we failed to add one. 
1139 1143
 */
1140
  public long alpha(float alpha, Float4D region, Float2D point)
1144
  public long alpha(float alpha, Float4D region, Float2D center)
1141 1145
    {
1142 1146
    Interpolator1D di = new Interpolator1D(); 
1143 1147
    di.setCount(0.5f);
......
1145 1149
    di.add(new Float1D(1));                          
1146 1150
    di.add(new Float1D(alpha));                         
1147 1151
   
1148
    return mF.add(EffectNames.ALPHA, di, region, point.x, point.y);
1152
    return mF.add(EffectNames.ALPHA, di, region, center);
1149 1153
    }
1150 1154
  
1151 1155
///////////////////////////////////////////////////////////////////////////////////////////////////
1152 1156
/**
1153
 * Makes the whole Bitmap change its transparency level.
1157
 * Makes the whole Object change its transparency level.
1154 1158
 * 
1155 1159
 * @param alpha    Level of Alpha (between 0 and 1) we want to interpolate to.
1156 1160
 * @param duration Time, in milliseconds, it takes to do one full interpolation.
......
1165 1169
    di.add(new Float1D(1));                            
1166 1170
    di.add(new Float1D(alpha));                        
1167 1171
         
1168
    return mF.add(EffectNames.ALPHA, di,null, 0.0f, 0.0f);
1172
    return mF.add(EffectNames.ALPHA, di,null, mZero2D);
1169 1173
    }
1170 1174

  
1171 1175
///////////////////////////////////////////////////////////////////////////////////////////////////  
1172 1176
/**
1173
 * Makes a certain sub-region of the Bitmap smoothly change its transparency level.
1177
 * Makes a certain sub-region of the Object smoothly change its transparency level.
1174 1178
 * 
1175 1179
 * See {@link #alpha(Interpolator1D, Float4D, Interpolator2D)}
1176 1180
 */
1177
  public long smooth_alpha(Interpolator1D a, Float4D region, Interpolator2D i)
1181
  public long smooth_alpha(Interpolator1D alpha, Float4D region, Interpolator2D center)
1178 1182
    {
1179
    return mF.add(EffectNames.SMOOTH_ALPHA, a, region, i);
1183
    return mF.add(EffectNames.SMOOTH_ALPHA, alpha, region, center);
1180 1184
    }
1181 1185

  
1182 1186
///////////////////////////////////////////////////////////////////////////////////////////////////
1183 1187
/**
1184
 * Makes a certain sub-region of the Bitmap smoothly change its transparency level.
1188
 * Makes a certain sub-region of the Object smoothly change its transparency level.
1185 1189
 * 
1186 1190
 * See {@link #alpha(Interpolator1D, Float4D, Float2D)}
1187 1191
 */
1188
  public long smooth_alpha(Interpolator1D a, Float4D region, Float2D point)
1192
  public long smooth_alpha(Interpolator1D alpha, Float4D region, Float2D center)
1189 1193
    {
1190
    return mF.add(EffectNames.SMOOTH_ALPHA, a, region, point.x, point.y);
1194
    return mF.add(EffectNames.SMOOTH_ALPHA, alpha, region, center);
1191 1195
    }
1192 1196
  
1193 1197
///////////////////////////////////////////////////////////////////////////////////////////////////  
1194 1198
/**
1195
 * Makes a certain sub-region of the Bitmap smoothly change its transparency level.
1199
 * Makes a certain sub-region of the Object smoothly change its transparency level.
1196 1200
 * 
1197 1201
 * See {@link #alpha(float, Float4D, Interpolator2D, int, float)}
1198 1202
 */
1199
  public long smooth_alpha(float alpha, Float4D region, Interpolator2D i, int duration, float count)
1203
  public long smooth_alpha(float alpha, Float4D region, Interpolator2D center, int duration, float count)
1200 1204
    {
1201 1205
    Interpolator1D di = new Interpolator1D(); 
1202 1206
    di.setCount(count);
......
1204 1208
    di.add(new Float1D(1));                          
1205 1209
    di.add(new Float1D(alpha));                         
1206 1210
   
1207
    return mF.add(EffectNames.SMOOTH_ALPHA, di, region, i);
1211
    return mF.add(EffectNames.SMOOTH_ALPHA, di, region, center);
1208 1212
    }
1209 1213

  
1210 1214
///////////////////////////////////////////////////////////////////////////////////////////////////
1211 1215
/**
1212
 * Makes a certain sub-region of the Bitmap smoothly change its transparency level.
1216
 * Makes a certain sub-region of the Object smoothly change its transparency level.
1213 1217
 * 
1214 1218
 * See {@link #alpha(float, Float4D, Float2D, int, float)}
1215 1219
 */
1216
  public long smooth_alpha(float alpha, Float4D region, Float2D point, int duration, float count)
1220
  public long smooth_alpha(float alpha, Float4D region, Float2D center, int duration, float count)
1217 1221
    {
1218 1222
    Interpolator1D di = new Interpolator1D(); 
1219 1223
    di.setCount(count);
......
1221 1225
    di.add(new Float1D(1));                          
1222 1226
    di.add(new Float1D(alpha));                         
1223 1227
   
1224
    return mF.add(EffectNames.SMOOTH_ALPHA, di, region, point.x, point.y);
1228
    return mF.add(EffectNames.SMOOTH_ALPHA, di, region, center);
1225 1229
    }
1226 1230
  
1227 1231
///////////////////////////////////////////////////////////////////////////////////////////////////
1228 1232
/**
1229
 * Makes a certain sub-region of the Bitmap smoothly change its transparency level.
1233
 * Makes a certain sub-region of the Object smoothly change its transparency level.
1230 1234
 * 
1231 1235
 * See {@link #alpha(float, Float4D, Float2D)}
1232 1236
 */
1233
  public long smooth_alpha(float alpha, Float4D region, Float2D point)
1237
  public long smooth_alpha(float alpha, Float4D region, Float2D center)
1234 1238
    {
1235 1239
    Interpolator1D di = new Interpolator1D(); 
1236 1240
    di.setCount(0.5f);
......
1238 1242
    di.add(new Float1D(1));                          
1239 1243
    di.add(new Float1D(alpha));                         
1240 1244
   
1241
    return mF.add(EffectNames.SMOOTH_ALPHA, di, region, point.x, point.y);
1245
    return mF.add(EffectNames.SMOOTH_ALPHA, di, region, center);
1242 1246
    }
1243 1247
  
1244 1248
///////////////////////////////////////////////////////////////////////////////////////////////////
1245 1249
///////////////////////////////////////////////////////////////////////////////////////////////////
1246 1250
// BRIGHTNESS
1247 1251
/**
1248
 * Makes a certain sub-region of the Bitmap smoothly change its brightness level.
1252
 * Makes a certain sub-region of the Object smoothly change its brightness level.
1249 1253
 *        
1250
 * @param a      1-dimensional Interpolator that returns the level of brightness we want to have at any given 
1251
 *               moment.
1252
 * @param region Region this Effect is limited to. 
1253
 *               Null here means 'apply the Effect to the whole Bitmap'.
1254
 * @param i      2-dimensional Interpolator which, at any given time, returns a Float2D representing the
1255
 *               current center of the effect.
1256
 * @return       ID of the effect added, or -1 if we failed to add one. 
1254
 * @param brightness 1-dimensional Interpolator that returns the level of brightness we want to have
1255
 *                   at any given moment.
1256
 * @param region     Region this Effect is limited to.
1257
 *                   Null here means 'apply the Effect to the whole Object'.
1258
 * @param center     2-dimensional Interpolator which, at any given time, returns a Float2D representing
1259
 *                   the current center of the effect.
1260
 * @return           ID of the effect added, or -1 if we failed to add one.
1257 1261
 */
1258
  public long brightness(Interpolator1D a, Float4D region, Interpolator2D i)
1262
  public long brightness(Interpolator1D brightness, Float4D region, Interpolator2D center)
1259 1263
    {
1260
    return mF.add(EffectNames.BRIGHTNESS, a, region, i);
1264
    return mF.add(EffectNames.BRIGHTNESS, brightness, region, center);
1261 1265
    }
1262 1266

  
1263 1267
///////////////////////////////////////////////////////////////////////////////////////////////////
1264 1268
/**
1265
 * Makes a certain sub-region of the Bitmap smoothly change its brightness level.
1269
 * Makes a certain sub-region of the Object smoothly change its brightness level.
1266 1270
 * <p>
1267 1271
 * Here the center of the Effect stays constant.
1268 1272
 *         
1269
 * @param a      1-dimensional Interpolator that returns the level of brightness we want to have at any given 
1270
 *               moment.
1271
 * @param region Region this Effect is limited to.
1272
 *               Null here means 'apply the Effect to the whole Bitmap'.
1273
 * @param point  Center of the Effect.
1274
 * @return       ID of the effect added, or -1 if we failed to add one. 
1273
 * @param brightness 1-dimensional Interpolator that returns the level of brightness we want to have
1274
 *                   at any given moment.
1275
 * @param region     Region this Effect is limited to.
1276
 *                   Null here means 'apply the Effect to the whole Object'.
1277
 * @param center     Center of the Effect.
1278
 * @return           ID of the effect added, or -1 if we failed to add one.
1275 1279
 */
1276
  public long brightness(Interpolator1D a, Float4D region, Float2D point)
1280
  public long brightness(Interpolator1D brightness, Float4D region, Float2D center)
1277 1281
    {
1278
    return mF.add(EffectNames.BRIGHTNESS, a, region, point.x, point.y);
1282
    return mF.add(EffectNames.BRIGHTNESS, brightness, region, center);
1279 1283
    }
1280 1284

  
1281 1285
///////////////////////////////////////////////////////////////////////////////////////////////////  
1282 1286
/**
1283
 * Makes a certain sub-region of the Bitmap smoothly change its brightness level.
1287
 * Makes a certain sub-region of the Object smoothly change its brightness level.
1284 1288
 *        
1285 1289
 * @param brightness Level of Brightness (between 0 and infinity) we want to interpolate to.
1286 1290
 *                   1 - level of brightness unchanged, anything less than 1 - 'darken the image',
1287 1291
 *                   anything more than 1- lighten it up. 
1288 1292
 * @param region     Region this Effect is limited to.
1289
 *                   Null here means 'apply the Effect to the whole Bitmap'.
1290
 * @param i          2-dimensional Interpolator which, at any given time, returns a Float2D
1293
 *                   Null here means 'apply the Effect to the whole Object'.
1294
 * @param center     2-dimensional Interpolator which, at any given time, returns a Float2D
1291 1295
 *                   representing the current center of the effect.
1292 1296
 * @param duration   Time, in milliseconds, it takes to do one full interpolation.
1293 1297
 * @param count      Controls how many interpolations we want to do. See {@link Interpolator#setCount(float)}
1294 1298
 * @return           ID of the effect added, or -1 if we failed to add one. 
1295 1299
 */
1296
  public long brightness(float brightness, Float4D region, Interpolator2D i, int duration, float count)
1300
  public long brightness(float brightness, Float4D region, Interpolator2D center, int duration, float count)
1297 1301
    {
1298 1302
    Interpolator1D di = new Interpolator1D(); 
1299 1303
    di.setCount(count);
......
1301 1305
    di.add(new Float1D(1));                          
1302 1306
    di.add(new Float1D(brightness));                         
1303 1307
   
1304
    return mF.add(EffectNames.BRIGHTNESS, di, region, i);
1308
    return mF.add(EffectNames.BRIGHTNESS, di, region, center);
1305 1309
    }
1306 1310

  
1307 1311
///////////////////////////////////////////////////////////////////////////////////////////////////
1308 1312
/**
1309
 * Makes a certain sub-region of the Bitmap smoothly change its brightness level.
1313
 * Makes a certain sub-region of the Object smoothly change its brightness level.
1310 1314
 * <p>
1311 1315
 * Here the center of the Effect stays constant.
1312 1316
 *         
......
1314 1318
 *                   1 - level of brightness unchanged, anything less than 1 - 'darken the image',
1315 1319
 *                   anything more than 1 - lighten it up.
1316 1320
 * @param region     Region this Effect is limited to. 
1317
 *                   Null here means 'apply the Effect to the whole Bitmap'.
1318
 * @param point      Center of the Effect.
1321
 *                   Null here means 'apply the Effect to the whole Object'.
1322
 * @param center     Center of the Effect.
1319 1323
 * @param duration   Time, in milliseconds, it takes to do one full interpolation.
1320 1324
 * @param count      Controls how many interpolations we want to do. See {@link Interpolator#setCount(float)}
1321 1325
 * @return           ID of the effect added, or -1 if we failed to add one. 
1322 1326
 */
1323
  public long brightness(float brightness, Float4D region, Float2D point, int duration, float count)
1327
  public long brightness(float brightness, Float4D region, Float2D center, int duration, float count)
1324 1328
    {
1325 1329
    Interpolator1D di = new Interpolator1D(); 
1326 1330
    di.setCount(count);
......
1328 1332
    di.add(new Float1D(1));                          
1329 1333
    di.add(new Float1D(brightness));                         
1330 1334
   
1331
    return mF.add(EffectNames.BRIGHTNESS, di, region, point.x, point.y);
1335
    return mF.add(EffectNames.BRIGHTNESS, di, region, center);
1332 1336
    }
1333 1337

  
1334 1338
///////////////////////////////////////////////////////////////////////////////////////////////////
1335 1339
/**
1336
 * Makes a certain sub-region of the Bitmap smoothly change its brightness level.
1340
 * Makes a certain sub-region of the Object smoothly change its brightness level.
1337 1341
 * <p>
1338 1342
 * Here the center of the Effect stays constant and the effect for now change in time.
1339 1343
 *         
......
1341 1345
 *                   1 - level of brightness unchanged, anything less than 1 - 'darken the image',
1342 1346
 *                   anything more than 1 - lighten it up.
1343 1347
 * @param region     Region this Effect is limited to.
1344
 *                   Null here means 'apply the Effect to the whole Bitmap'.
1345
 * @param point      Center of the Effect.
1348
 *                   Null here means 'apply the Effect to the whole Object'.
1349
 * @param center     Center of the Effect.
1346 1350
 * @return           ID of the effect added, or -1 if we failed to add one. 
1347 1351
 */
1348
  public long brightness(float brightness, Float4D region, Float2D point)
1352
  public long brightness(float brightness, Float4D region, Float2D center)
1349 1353
    {
1350 1354
    Interpolator1D di = new Interpolator1D(); 
1351 1355
    di.setCount(0.5f);
......
1353 1357
    di.add(new Float1D(1));                          
1354 1358
    di.add(new Float1D(brightness));                         
1355 1359
   
1356
    return mF.add(EffectNames.BRIGHTNESS, di, region, point.x, point.y);
1360
    return mF.add(EffectNames.BRIGHTNESS, di, region, center);
1357 1361
    }
1358 1362
 
1359 1363
///////////////////////////////////////////////////////////////////////////////////////////////////
1360 1364
///////////////////////////////////////////////////////////////////////////////////////////////////
1361 1365
// SMOOTH BRIGHTNESS
1362 1366
/**
1363
 * Makes a certain sub-region of the Bitmap smoothly change its brightness level.
1367
 * Makes a certain sub-region of the Object smoothly change its brightness level.
1364 1368
 *        
1365
 * @param a      1-dimensional Interpolator that returns the level of brightness we want to have at
1366
 *               any given moment.
1367
 * @param region Region this Effect is limited to. 
1368
 *               Null here means 'apply the Effect to the whole Bitmap'.
1369
 * @param i      2-dimensional Interpolator which, at any given time, returns a Float2D
1370
 *               representing the current center of the effect.
1371
 * @return       ID of the effect added, or -1 if we failed to add one. 
1369
 * @param brightness 1-dimensional Interpolator that returns the level of brightness we want to have
1370
 *                   at any given moment.
1371
 * @param region     Region this Effect is limited to.
1372
 *                   Null here means 'apply the Effect to the whole Object'.
1373
 * @param center     2-dimensional Interpolator which, at any given time, returns a Float2D
1374
 *                   representing the current center of the effect.
1375
 * @return           ID of the effect added, or -1 if we failed to add one.
1372 1376
 */
1373
  public long smooth_brightness(Interpolator1D a, Float4D region, Interpolator2D i)
1377
  public long smooth_brightness(Interpolator1D brightness, Float4D region, Interpolator2D center)
1374 1378
    {
1375
    return mF.add(EffectNames.SMOOTH_BRIGHTNESS, a, region, i);
1379
    return mF.add(EffectNames.SMOOTH_BRIGHTNESS, brightness, region, center);
1376 1380
    }
1377 1381

  
1378 1382
///////////////////////////////////////////////////////////////////////////////////////////////////
1379 1383
/**
1380
 * Makes a certain sub-region of the Bitmap smoothly change its brightness level.
1384
 * Makes a certain sub-region of the Object smoothly change its brightness level.
1381 1385
 * <p>
1382 1386
 * Here the center of the Effect stays constant.
1383 1387
 *         
1384
 * @param a      1-dimensional Interpolator that returns the level of brightness we want to have at
1385
 *               any given moment.
1386
 * @param region Region this Effect is limited to. 
1387
 *               Null here means 'apply the Effect to the whole Bitmap'.
1388
 * @param point  Center of the Effect.
1389
 * @return       ID of the effect added, or -1 if we failed to add one. 
1388
 * @param brightness 1-dimensional Interpolator that returns the level of brightness we want to have
1389
 *                   at any given moment.
1390
 * @param region     Region this Effect is limited to.
1391
 *                   Null here means 'apply the Effect to the whole Object'.
1392
 * @param center     Center of the Effect.
1393
 * @return           ID of the effect added, or -1 if we failed to add one.
1390 1394
 */
1391
  public long smooth_brightness(Interpolator1D a, Float4D region, Float2D point)
1395
  public long smooth_brightness(Interpolator1D brightness, Float4D region, Float2D center)
1392 1396
    {
1393
    return mF.add(EffectNames.SMOOTH_BRIGHTNESS, a, region, point.x, point.y);
1397
    return mF.add(EffectNames.SMOOTH_BRIGHTNESS, brightness, region, center);
1394 1398
    }
1395 1399

  
1396 1400
///////////////////////////////////////////////////////////////////////////////////////////////////  
1397 1401
/**
1398
 * Makes a certain sub-region of the Bitmap smoothly change its brightness level.
1402
 * Makes a certain sub-region of the Object smoothly change its brightness level.
1399 1403
 *        
1400 1404
 * @param brightness Level of Brightness (between 0 and infinity) we want to interpolate to.
1401 1405
 *                   1 - level of brightness unchanged, anything less than 1 - 'darken the image',
1402 1406
 *                   anything more than 1 - lighten it up. 
1403 1407
 * @param region     Region this Effect is limited to. 
1404
 *                   Null here means 'apply the Effect to the whole Bitmap'.
1405
 * @param i          2-dimensional Interpolator which, at any given time, returns a Float2D
1408
 *                   Null here means 'apply the Effect to the whole Object'.
1409
 * @param center     2-dimensional Interpolator which, at any given time, returns a Float2D
1406 1410
 *                   represention the current center of the effect.
1407 1411
 * @param duration   Time, in milliseconds, it takes to do one full interpolation.
1408 1412
 * @param count      Controls how many interpolations we want to do. See {@link Interpolator#setCount(float)}
1409 1413
 * @return           ID of the effect added, or -1 if we failed to add one. 
1410 1414
 */
1411
  public long smooth_brightness(float brightness, Float4D region, Interpolator2D i, int duration, float count)
1415
  public long smooth_brightness(float brightness, Float4D region, Interpolator2D center, int duration, float count)
1412 1416
    {
1413 1417
    Interpolator1D di = new Interpolator1D(); 
1414 1418
    di.setCount(count);
......
1416 1420
    di.add(new Float1D(1));                          
1417 1421
    di.add(new Float1D(brightness));                         
1418 1422
   
1419
    return mF.add(EffectNames.SMOOTH_BRIGHTNESS, di, region, i);
1423
    return mF.add(EffectNames.SMOOTH_BRIGHTNESS, di, region, center);
1420 1424
    }
1421 1425

  
1422 1426
///////////////////////////////////////////////////////////////////////////////////////////////////
1423 1427
/**
1424
 * Makes a certain sub-region of the Bitmap smoothly change its brightness level.
1428
 * Makes a certain sub-region of the Object smoothly change its brightness level.
1425 1429
 * <p>
1426 1430
 * Here the center of the Effect stays constant.
1427 1431
 *         
......
1429 1433
 *                   1 - level of brightness unchanged, anything less than 1 - 'darken the image',
1430 1434
 *                   anything more than 1 - lighten it up.
1431 1435
 * @param region     Region this Effect is limited to. 
1432
 *                   Null here means 'apply the Effect to the whole Bitmap'.
1433
 * @param point      Center of the Effect.
1436
 *                   Null here means 'apply the Effect to the whole Object'.
1437
 * @param center     Center of the Effect.
1434 1438
 * @param duration   Time, in milliseconds, it takes to do one full interpolation.
1435 1439
 * @param count      Controls how many interpolations we want to do. See {@link Interpolator#setCount(float)}
1436 1440
 * @return           ID of the effect added, or -1 if we failed to add one. 
1437 1441
 */
1438
  public long smooth_brightness(float brightness, Float4D region, Float2D point, int duration, float count)
1442
  public long smooth_brightness(float brightness, Float4D region, Float2D center, int duration, float count)
1439 1443
    {
1440 1444
    Interpolator1D di = new Interpolator1D(); 
1441 1445
    di.setCount(count);
......
1443 1447
    di.add(new Float1D(1));                          
1444 1448
    di.add(new Float1D(brightness));                         
1445 1449
   
1446
    return mF.add(EffectNames.SMOOTH_BRIGHTNESS, di, region, point.x, point.y);
1450
    return mF.add(EffectNames.SMOOTH_BRIGHTNESS, di, region, center);
1447 1451
    }
1448 1452

  
1449 1453
///////////////////////////////////////////////////////////////////////////////////////////////////
1450 1454
/**
1451
 * Makes a certain sub-region of the Bitmap smoothly change its brightness level.
1455
 * Makes a certain sub-region of the Object smoothly change its brightness level.
1452 1456
 * <p>
1453 1457
 * Here the center of the Effect stays constant and the effect for now change in time.
1454 1458
 *         
......
1456 1460
 *                   1 - level of brightness unchanged, anything less than 1 - 'darken the image',
1457 1461
 *                   anything more than 1 - lighten it up.
1458 1462
 * @param region     Region this Effect is limited to. 
1459
 *                   Null here means 'apply the Effect to the whole Bitmap'.
1460
 * @param point      Center of the Effect.
1463
 *                   Null here means 'apply the Effect to the whole Object'.
1464
 * @param center     Center of the Effect.
1461 1465
 * @return           ID of the effect added, or -1 if we failed to add one. 
1462 1466
 */
1463
  public long smooth_brightness(float brightness, Float4D region, Float2D point)
1467
  public long smooth_brightness(float brightness, Float4D region, Float2D center)
1464 1468
    {
1465 1469
    Interpolator1D di = new Interpolator1D(); 
1466 1470
    di.setCount(0.5f);
......
1468 1472
    di.add(new Float1D(1));                          
1469 1473
    di.add(new Float1D(brightness));                         
1470 1474
   
1471
    return mF.add(EffectNames.SMOOTH_BRIGHTNESS, di, region, point.x, point.y);
1475
    return mF.add(EffectNames.SMOOTH_BRIGHTNESS, di, region, center);
1472 1476
    }
1473 1477
    
1474 1478
///////////////////////////////////////////////////////////////////////////////////////////////////
1475 1479
/**
1476
 * Makes the whole Bitmap change its brightness level.
1480
 * Makes the whole Object change its brightness level.
1477 1481
 * 
1478 1482
 * @param brightness Level of Brightness (between 0 and infinity) we want to interpolate to.
1479 1483
 *                   1 - level of brightness unchanged, anything less than 1 - 'darken the image',
......
1490 1494
    di.add(new Float1D(1));                            
1491 1495
    di.add(new Float1D(brightness));                        
1492 1496
         
1493
    return mF.add(EffectNames.SMOOTH_BRIGHTNESS, di,null, 0.0f, 0.0f);
1497
    return mF.add(EffectNames.SMOOTH_BRIGHTNESS, di,null, mZero2D);
1494 1498
    }
1495 1499

  
1496 1500
///////////////////////////////////////////////////////////////////////////////////////////////////
1497 1501
///////////////////////////////////////////////////////////////////////////////////////////////////
1498 1502
// CONTRAST
1499 1503
/**
1500
 * Makes a certain sub-region of the Bitmap smoothly change its contrast level.
1504
 * Makes a certain sub-region of the Object smoothly change its contrast level.
1501 1505
 *        
1502
 * @param a      1-dimensional Interpolator that returns the level of contrast we want to have
1503
 *               at any given moment.
1504
 * @param region Region this Effect is limited to. 
1505
 *               Null here means 'apply the Effect to the whole Bitmap'.
1506
 * @param i      2-dimensional Interpolator which, at any given time, returns a Float2D
1507
 *               representing the current center of the effect.
1508
 * @return       ID of the effect added, or -1 if we failed to add one. 
1506
 * @param contrast 1-dimensional Interpolator that returns the level of contrast we want to have
1507
 *                 at any given moment.
1508
 * @param region   Region this Effect is limited to.
1509
 *                 Null here means 'apply the Effect to the whole Object'.
1510
 * @param center   2-dimensional Interpolator which, at any given time, returns a Float2D
1511
 *                 representing the current center of the effect.
1512
 * @return         ID of the effect added, or -1 if we failed to add one.
1509 1513
 */
1510
  public long contrast(Interpolator1D a, Float4D region, Interpolator2D i)
1514
  public long contrast(Interpolator1D contrast, Float4D region, Interpolator2D center)
1511 1515
    {
1512
    return mF.add(EffectNames.CONTRAST, a, region, i);
1516
    return mF.add(EffectNames.CONTRAST, contrast, region, center);
1513 1517
    }
1514 1518

  
1515 1519
///////////////////////////////////////////////////////////////////////////////////////////////////
1516 1520
/**
1517
 * Makes a certain sub-region of the Bitmap smoothly change its contrast level.
1521
 * Makes a certain sub-region of the Object smoothly change its contrast level.
1518 1522
 * <p>
1519 1523
 * Here the center of the Effect stays constant.
1520 1524
 *         
1521
 * @param a      1-dimensional Interpolator that returns the level of contrast we want to have
1522
 *               at any given moment.
1523
 * @param region Region this Effect is limited to.
1524
 *               Null here means 'apply the Effect to the whole Bitmap'.
1525
 * @param point  Center of the Effect.
1526
 * @return       ID of the effect added, or -1 if we failed to add one. 
1525
 * @param contrast 1-dimensional Interpolator that returns the level of contrast we want to have
1526
 *                 at any given moment.
1527
 * @param region   Region this Effect is limited to.
1528
 *                 Null here means 'apply the Effect to the whole Object'.
1529
 * @param center  Center of the Effect.
1530
 * @return        ID of the effect added, or -1 if we failed to add one.
1527 1531
 */
1528
  public long contrast(Interpolator1D a, Float4D region, Float2D point)
1532
  public long contrast(Interpolator1D contrast, Float4D region, Float2D center)
1529 1533
    {
1530
    return mF.add(EffectNames.CONTRAST, a, region, point.x, point.y);
1534
    return mF.add(EffectNames.CONTRAST, contrast, region, center);
1531 1535
    }
1532 1536

  
1533 1537
///////////////////////////////////////////////////////////////////////////////////////////////////  
1534 1538
/**
1535
 * Makes a certain sub-region of the Bitmap smoothly change its contrast level.
1539
 * Makes a certain sub-region of the Object smoothly change its contrast level.
1536 1540
 *        
1537 1541
 * @param contrast Level of contrast (between 0 and infinity) we want to interpolate to.
1538 1542
 *                 1 - level of contrast unchanged, anything less than 1 - reduce contrast,
1539 1543
 *                 anything more than 1 - increase the contrast. 
1540 1544
 * @param region   Region this Effect is limited to.
1541
 *                 Null here means 'apply the Effect to the whole Bitmap'.
1542
 * @param i        2-dimensional Interpolator which, at any given time, returns a Float2D
1545
 *                 Null here means 'apply the Effect to the whole Object'.
1546
 * @param center   2-dimensional Interpolator which, at any given time, returns a Float2D
1543 1547
 *                 represention the current center of the effect.
1544 1548
 * @param duration Time, in milliseconds, it takes to do one full interpolation.
1545 1549
 * @param count    Controls how many interpolations we want to do. See {@link Interpolator#setCount(float)}
1546 1550
 * @return         ID of the effect added, or -1 if we failed to add one. 
1547 1551
 */
1548
  public long contrast(float contrast, Float4D region, Interpolator2D i, int duration, float count)
1552
  public long contrast(float contrast, Float4D region, Interpolator2D center, int duration, float count)
1549 1553
    {
1550 1554
    Interpolator1D di = new Interpolator1D(); 
1551 1555
    di.setCount(count);
......
1553 1557
    di.add(new Float1D(1));                          
1554 1558
    di.add(new Float1D(contrast));                         
1555 1559
   
1556
    return mF.add(EffectNames.CONTRAST, di, region, i);
1560
    return mF.add(EffectNames.CONTRAST, di, region, center);
1557 1561
    }
1558 1562

  
1559 1563
///////////////////////////////////////////////////////////////////////////////////////////////////
1560 1564
/**
1561
 * Makes a certain sub-region of the Bitmap smoothly change its contrast level.
1565
 * Makes a certain sub-region of the Object smoothly change its contrast level.
1562 1566
 * <p>
1563 1567
 * Here the center of the Effect stays constant.
1564 1568
 *         
......
1566 1570
 *                 1 - level of contrast unchanged, anything less than 1 - reduce contrast,
1567 1571
 *                 anything more than 1 -increase the contrast. 
1568 1572
 * @param region   Region this Effect is limited to. 
1569
 *                 Null here means 'apply the Effect to the whole Bitmap'.
1570
 * @param point    Center of the Effect.
1573
 *                 Null here means 'apply the Effect to the whole Object'.
1574
 * @param center   Center of the Effect.
1571 1575
 * @param duration Time, in milliseconds, it takes to do one full interpolation.
1572 1576
 * @param count    Controls how many interpolations we want to do. See {@link Interpolator#setCount(float)}
1573 1577
 * @return         ID of the effect added, or -1 if we failed to add one. 
1574 1578
 */
1575
  public long contrast(float contrast, Float4D region, Float2D point, int duration, float count)
1579
  public long contrast(float contrast, Float4D region, Float2D center, int duration, float count)
1576 1580
    {
1577 1581
    Interpolator1D di = new Interpolator1D(); 
1578 1582
    di.setCount(count);
......
1580 1584
    di.add(new Float1D(1));                          
1581 1585
    di.add(new Float1D(contrast));                         
1582 1586
   
1583
    return mF.add(EffectNames.CONTRAST, di, region, point.x, point.y);
1587
    return mF.add(EffectNames.CONTRAST, di, region, center);
1584 1588
    }
1585 1589

  
1586 1590
///////////////////////////////////////////////////////////////////////////////////////////////////
1587 1591
/**
1588
 * Makes a certain sub-region of the Bitmap smoothly change its contrast level.
1592
 * Makes a certain sub-region of the Object smoothly change its contrast level.
1589 1593
 * <p>
1590 1594
 * Here the center of the Effect stays constant and the effect for now change in time.
1591 1595
 *         
......
1593 1597
 *                 1 - level of contrast unchanged, anything less than 1 - reduce contrast,
1594 1598
 *                 anything more than 1 - increase the contrast. 
1595 1599
 * @param region   Region this Effect is limited to. 
1596
 *                 Null here means 'apply the Effect to the whole Bitmap'.
1597
 * @param point    Center of the Effect.
1600
 *                 Null here means 'apply the Effect to the whole Object'.
1601
 * @param center   Center of the Effect.
1598 1602
 * @return         ID of the effect added, or -1 if we failed to add one. 
1599 1603
 */
1600
  public long contrast(float contrast, Float4D region, Float2D point)
1604
  public long contrast(float contrast, Float4D region, Float2D center)
1601 1605
    {
1602 1606
    Interpolator1D di = new Interpolator1D(); 
1603 1607
    di.setCount(0.5f);
......
1605 1609
    di.add(new Float1D(1));                          
1606 1610
    di.add(new Float1D(contrast));                         
1607 1611
   
1608
    return mF.add(EffectNames.CONTRAST, di, region, point.x, point.y);
1612
    return mF.add(EffectNames.CONTRAST, di, region, center);
1609 1613
    }
1610 1614
 
1611 1615
///////////////////////////////////////////////////////////////////////////////////////////////////
1612 1616
///////////////////////////////////////////////////////////////////////////////////////////////////
1613 1617
// SMOOTH CONTRAST
1614 1618
/**
1615
 * Makes a certain sub-region of the Bitmap smoothly change its contrast level.
1619
 * Makes a certain sub-region of the Object smoothly change its contrast level.
1616 1620
 *        
1617
 * @param a      1-dimensional Interpolator that returns the level of contrast we want to have
1618
 *               at any given moment.
1619
 * @param region Region this Effect is limited to. 
1620
 *               Null here means 'apply the Effect to the whole Bitmap'.
1621
 * @param i      2-dimensional Interpolator which, at any given time, returns a Float2D
1622
 *               representing the current center of the effect.
1623
 * @return       ID of the effect added, or -1 if we failed to add one. 
1621
 * @param contrast 1-dimensional Interpolator that returns the level of contrast we want to have
1622
 *                 at any given moment.
1623
 * @param region   Region this Effect is limited to.
1624
 *                 Null here means 'apply the Effect to the whole Object'.
1625
 * @param center   2-dimensional Interpolator which, at any given time, returns a Float2D
1626
 *                 representing the current center of the effect.
1627
 * @return         ID of the effect added, or -1 if we failed to add one.
1624 1628
 */
1625
  public long smooth_contrast(Interpolator1D a, Float4D region, Interpolator2D i)
1629
  public long smooth_contrast(Interpolator1D contrast, Float4D region, Interpolator2D center)
1626 1630
    {
1627
    return mF.add(EffectNames.SMOOTH_CONTRAST, a, region, i);
1631
    return mF.add(EffectNames.SMOOTH_CONTRAST, contrast, region, center);
1628 1632
    }
1629 1633

  
1630 1634
///////////////////////////////////////////////////////////////////////////////////////////////////
1631 1635
/**
1632
 * Makes a certain sub-region of the Bitmap smoothly change its contrast level.
1636
 * Makes a certain sub-region of the Object smoothly change its contrast level.
1633 1637
 * <p>
1634 1638
 * Here the center of the Effect stays constant.
1635 1639
 *         
1636
 * @param a      1-dimensional Interpolator that returns the level of contrast we want to have
1637
 *               at any given moment.
1638
 * @param region Region this Effect is limited to. 
1639
 *               Null here means 'apply the Effect to the whole Bitmap'.
1640
 * @param point  Center of the Effect.
1641
 * @return       ID of the effect added, or -1 if we failed to add one. 
1640
 * @param contrast 1-dimensional Interpolator that returns the level of contrast we want to have
1641
 *                 at any given moment.
1642
 * @param region   Region this Effect is limited to.
1643
 *                 Null here means 'apply the Effect to the whole Object'.
1644
 * @param center   Center of the Effect.
1645
 * @return         ID of the effect added, or -1 if we failed to add one.
1642 1646
 */
1643
  public long smooth_contrast(Interpolator1D a, Float4D region, Float2D point)
1647
  public long smooth_contrast(Interpolator1D contrast, Float4D region, Float2D center)
1644 1648
    {
1645
    return mF.add(EffectNames.SMOOTH_CONTRAST, a, region, point.x, point.y);
1649
    return mF.add(EffectNames.SMOOTH_CONTRAST, contrast, region, center);
1646 1650
    }
1647 1651

  
1648 1652
///////////////////////////////////////////////////////////////////////////////////////////////////  
1649 1653
/**
1650
 * Makes a certain sub-region of the Bitmap smoothly change its contrast level.
1654
 * Makes a certain sub-region of the Object smoothly change its contrast level.
1651 1655
 *        
1652 1656
 * @param contrast Level of contrast (between 0 and infinity) we want to interpolate to.
1653 1657
 *                 1 - level of contrast unchanged, anything less than 1 - reduce contrast,
1654 1658
 *                 anything more than 1 - increase the contrast. 
1655 1659
 * @param region   Region this Effect is limited to. 
1656
 *                 Null here means 'apply the Effect to the whole Bitmap'.
1657
 * @param i        2-dimensional Interpolator which, at any given time, returns a Float2D
1660
 *                 Null here means 'apply the Effect to the whole Object'.
1661
 * @param center   2-dimensional Interpolator which, at any given time, returns a Float2D
1658 1662
 *                 representing the current center of the effect.
1659 1663
 * @param duration Time, in milliseconds, it takes to do one full interpolation.
1660 1664
 * @param count    Controls how many interpolations we want to do. See {@link Interpolator#setCount(float)}
1661 1665
 * @return         ID of the effect added, or -1 if we failed to add one. 
1662 1666
 */
1663
  public long smooth_contrast(float contrast, Float4D region, Interpolator2D i, int duration, float count)
1667
  public long smooth_contrast(float contrast, Float4D region, Interpolator2D center, int duration, float count)
1664 1668
    {
1665 1669
    Interpolator1D di = new Interpolator1D(); 
1666 1670
    di.setCount(count);
......
1668 1672
    di.add(new Float1D(1));                          
1669 1673
    di.add(new Float1D(contrast));                         
1670 1674
   
1671
    return mF.add(EffectNames.SMOOTH_CONTRAST, di, region, i);
1675
    return mF.add(EffectNames.SMOOTH_CONTRAST, di, region, center);
1672 1676
    }
1673 1677

  
1674 1678
///////////////////////////////////////////////////////////////////////////////////////////////////
1675 1679
/**
1676
 * Makes a certain sub-region of the Bitmap smoothly change its contrast level.
1680
 * Makes a certain sub-region of the Object smoothly change its contrast level.
1677 1681
 * <p>
1678 1682
 * Here the center of the Effect stays constant.
1679 1683
 *         
......
1681 1685
 *                 1 - level of contrast unchanged, anything less than 1 - reduce contrast,
1682 1686
 *                 anything more than 1 - increase the contrast. 
1683 1687
 * @param region   Region this Effect is limited to. 
1684
 *                 Null here means 'apply the Effect to the whole Bitmap'.
1685
 * @param point    Center of the Effect.
1688
 *                 Null here means 'apply the Effect to the whole Object'.
1689
 * @param center   Center of the Effect.
1686 1690
 * @param duration Time, in milliseconds, it takes to do one full interpolation.
1687 1691
 * @param count    Controls how many interpolations we want to do. See {@link Interpolator#setCount(float)}
1688 1692
 * @return         ID of the effect added, or -1 if we failed to add one. 
1689 1693
 */
1690
  public long smooth_contrast(float contrast, Float4D region, Float2D point, int duration, float count)
1694
  public long smooth_contrast(float contrast, Float4D region, Float2D center, int duration, float count)
1691 1695
    {
1692 1696
    Interpolator1D di = new Interpolator1D(); 
1693 1697
    di.setCount(count);
......
1695 1699
    di.add(new Float1D(1));                          
1696 1700
    di.add(new Float1D(contrast));                         
1697 1701
   
1698
    return mF.add(EffectNames.SMOOTH_CONTRAST, di, region, point.x, point.y);
1702
    return mF.add(EffectNames.SMOOTH_CONTRAST, di, region, center);
1699 1703
    }
1700 1704

  
1701 1705
///////////////////////////////////////////////////////////////////////////////////////////////////
1702 1706
/**
1703
 * Makes a certain sub-region of the Bitmap smoothly change its contrast level.
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff