EControl Syntax Editor SDK
TCustomSyntaxMemo.OnAnimate Event

Occurs on each step of animation shape drawing if animation type is atCustom.

property OnAnimate: TAnimateEvent;

Write OnAnimate event handler to implement custom animation. Custom animation is used if you assign atCustom to properties Animation.BookmarkAnim, Animation.MarkerAnim and user is jumping to bookmark, marker, or if you call Animation.Animate method passing atCustom as AnimType parameter. 


When OnAnimate is called Canvas is already in pmNotXor mode. 


Pt parameter specifies position in syntax memo's coordinates (relatively to the syntax memo origin). Size specifies dimensions of the animation shape. Initially Size is equal to Animation.Radius. During each step of animation Size is reduced on Animation.Step. 


For each step OnAnimate is called twice: for the first time to erase previous shape (with previous Size), for the second time to draw new shape (with the new reduced Size).

Copyright (c) 2004-2011. All rights reserved.
What do you think about this topic? Send feedback!