tasn pushed a commit to branch master.

http://git.enlightenment.org/bindings/cxx/eflxx.git/commit/?id=5783211bf6c223dcec122606030cc183782bbfb6

commit 5783211bf6c223dcec122606030cc183782bbfb6
Author: Andreas Volz <[email protected]>
Date:   Wed Nov 17 22:11:34 2010 +0000

    removed Gradient usage in this example
    
    SVN revision: 54657
---
 eflxx_examples/src/ecorexx/calibrate/calibrate.cpp | 14 +-------------
 eflxx_examples/src/ecorexx/calibrate/calibrate.h   |  2 +-
 2 files changed, 2 insertions(+), 14 deletions(-)

diff --git a/eflxx_examples/src/ecorexx/calibrate/calibrate.cpp 
b/eflxx_examples/src/ecorexx/calibrate/calibrate.cpp
index 980e262..8d67985 100644
--- a/eflxx_examples/src/ecorexx/calibrate/calibrate.cpp
+++ b/eflxx_examples/src/ecorexx/calibrate/calibrate.cpp
@@ -115,12 +115,8 @@ CalibrationRectangle::CalibrationRectangle( Evasxx::Canvas 
&evas, const Rect &re
   floor->show();
 
   // setup background
-  background = new Evasxx::Gradient( evas, Rect (0, 0, s.width(), s.height()) 
);
+  background = new Evasxx::Rectangle( evas, Rect (0, 0, s.width(), s.height()) 
);
   background->setLayer( 5 );
-  background->setAngle( angle = 13 );
-  background->addColorStop( Color (255, 255, 255, 255),  10 );
-  background->addColorStop( Color (170, 160, 190, 255), 5 );
-  background->addColorStop( Color (255, 255, 240, 255), 10 );
   background->setColor( Color (255, 255, 255, 255) );
   //background->show();
   //new CalibrationAnimator( CalibrationAnimator::alpha, background, 255, 0 );
@@ -395,13 +391,6 @@ bool CalibrationAnimator::tick()
     if ( newy < _y ) newy++;
     _o->move( Point (newx, newy) );
     return true;
-  case angle:
-    newx = static_cast<Evasxx::Gradient*>( _o )->getAngle();
-    if ( newx == _x ) return false;
-    if ( newx > _x ) newx--;
-    if ( newx < _x ) newx++;
-    static_cast<Evasxx::Gradient*>( _o )->setAngle( newx );
-    return true;
   case alpha:
     c = _o->getColor();
     newx = c.alpha();
@@ -418,5 +407,4 @@ bool CalibrationAnimator::tick()
 void CalibrationRectangle::timerEvent()
 {
   cout << "CalibrationAnimator::timerEvent()" << endl;
-  background->setAngle( ++angle );
 }
diff --git a/eflxx_examples/src/ecorexx/calibrate/calibrate.h 
b/eflxx_examples/src/ecorexx/calibrate/calibrate.h
index a9159f9..ed2384e 100644
--- a/eflxx_examples/src/ecorexx/calibrate/calibrate.h
+++ b/eflxx_examples/src/ecorexx/calibrate/calibrate.h
@@ -44,7 +44,7 @@ protected:
 private:
   CalibrationData cd;
   unsigned int position;
-  Evasxx::Gradient* background;
+  Evasxx::Rectangle* background;
   Evasxx::Image* crosshair;
   Evasxx::Image* crosshairShadow;
   Evasxx::Line* crosshairhorz;

-- 


Reply via email to