// CLASS HEADER
#include "frame-callback.h"
-#include <iostream>
-
using namespace Dali;
FrameCallback::FrameCallback()
{
Vector3 position;
Vector3 size;
- updateProxy.GetPositionAndSize( i, position, size ); // Retrieve the position and size using the Actor ID.
-
- float halfWidthPoint = stageHalfWidth - size.width * 0.5f;
- float xTranslation = std::abs( position.x );
- if( xTranslation > halfWidthPoint )
+ if( updateProxy.GetPositionAndSize( i, position, size ) ) // Retrieve the position and size using the Actor ID.
{
- // Actor has hit the edge, adjust the size accordingly.
- float adjustment = xTranslation - halfWidthPoint;
- size.width += adjustment * SIZE_MULTIPLIER;
- size.height += adjustment * SIZE_MULTIPLIER;
+ float halfWidthPoint = stageHalfWidth - size.width * 0.5f;
+ float xTranslation = std::abs( position.x );
+ if( xTranslation > halfWidthPoint )
+ {
+ // Actor has hit the edge, adjust the size accordingly.
+ float adjustment = xTranslation - halfWidthPoint;
+ size.width += adjustment * SIZE_MULTIPLIER;
+ size.height += adjustment * SIZE_MULTIPLIER;
- updateProxy.SetSize( i, size ); // Set the size using the UpdateProxy.
- }
+ updateProxy.SetSize( i, size ); // Set the size using the UpdateProxy.
+ }
- // Retrieve the actor's position and set make it more transparent the closer it is to the middle.
- Vector4 color = updateProxy.GetWorldColor( i );
- color.a = xTranslation / halfWidthPoint;
- updateProxy.SetWorldColor( i, color );
+ // Retrieve the actor's position and set make it more transparent the closer it is to the middle.
+ Vector4 color;
+ if( updateProxy.GetColor( i, color ) )
+ {
+ color.a = xTranslation / halfWidthPoint;
+ updateProxy.SetColor( i, color );
+ }
+ }
}
}