X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=docs%2Fcontent%2Fprogramming-guide%2Fanimation-multi-threading-notes.h;h=5027fd509842cf201c2b0a7660b884acd1187863;hb=e9eec9423f448c42c84bf5bd7e0b7c89c40a1820;hp=4c0645087cdd69497688347d0034d893b30c8288;hpb=9f9bd6287b64fab61422e8b4a0d61a379c47176c;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/docs/content/programming-guide/animation-multi-threading-notes.h b/docs/content/programming-guide/animation-multi-threading-notes.h index 4c06450..5027fd5 100644 --- a/docs/content/programming-guide/animation-multi-threading-notes.h +++ b/docs/content/programming-guide/animation-multi-threading-notes.h @@ -13,9 +13,9 @@ An example actor hierachy is shown below, in which one of the actors is being an

Reading an animated value

-When a property is animatable, it can only be modified in the rendering thread. The value returned from a getter method, is the value used when the previous frame was rendered. +When a property is animatable, it can only be modified in the rendering thread. The value returned from the property, is the value used when the previous frame was rendered. -For example \ref Dali::Actor::GetCurrentPosition "Dali::Actor::GetCurrentPosition" returns the position at which the Actor was last rendered. Since \ref Dali::Actor::SetPosition "Dali::Actor::SetPosition" is asynchronous, a call to \ref Dali::Actor::GetCurrentPosition "Dali::Actor::GetCurrentPosition" won't immediately return the same value. +For example \ref Dali::Actor::Property::POSITION "Dali::Actor::Property::POSITION" returns the position at which the Actor was last rendered. Since \ref Dali::Actor::Property::POSITION "Dali::Actor::Property::POSITION" is asynchronous, a call to GetProperty( \ref Dali::Actor::Property::POSITION "Dali::Actor::Property::POSITION" ) won't immediately return the same value. @code // Whilst handling an event... @@ -23,17 +23,17 @@ For example \ref Dali::Actor::GetCurrentPosition "Dali::Actor::GetCurrentPositio Actor actor = Actor::New(); Stage::GetCurrent().Add(actor); // initial position is 0,0,0 -actor.SetPosition(Vector3(10,10,10)); +actor.SetProperty( Actor::Property::POSITION, Vector3(10.0f, 10.0f, 10.0f) ); Vector3 current; -current = actor.GetCurrentPosition(); +current = actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ); std::cout << "Current position: " << current.x << ", " << current.y << ", " << current.z << std::endl; std::cout << "..." << std::endl; // Whilst handling another event... -current = actor.GetCurrentPosition(); +current = actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ); std::cout << "Current position: " << current.x << ", " << current.y << ", " << current.z << std::endl; @endcode @@ -48,7 +48,7 @@ The example code above would likely output:

Setting a property during an animation

-When a property is being animated, the Animation will override any values set e.g. with Actor::SetPosition() +When a property is being animated, the Animation will override any values set e.g. with Actor::Property::Position. \image html multi-threaded-animation-2.png