Animation restrictions?

General TRichView support forum. Please post your questions here
Sega-Zero
Posts: 19
Joined: Thu Nov 22, 2007 9:11 pm

Post by Sega-Zero »

it seems like TRVAnimator.IsVisible sometimes returns False instead of True. Commented the IsVisible checking and no animation dissapearing.
Could you clarify how IsVisible works?
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

IsVisible returns True if the animation is visible in TRichView window (at least partially) and should be redrawn. If you comment out this check, animation will be slower because the component will attempt to redraw all animations even if they are invisible (invisible because of scrolling).
Invisible animations must continue recalculating frame indices, but they will not be redrawn until they become visible.
Sega-Zero
Posts: 19
Joined: Thu Nov 22, 2007 9:11 pm

Post by Sega-Zero »

Well, the meaning of that function is clear. But it seems like it isn't work correct. It returns False when animation is visible. Could it be caused because of items rearrangement?
While adding the animations i've set the limit to lets say 50k animations. All the animations at the beginning that don't fit to that limitation are replaced by text. Or maybe that is because of mixing text and animation with a several styles?

cannot understand the code of IsVisible
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

The code is simple. It compares vertical coordinates of animation and visible area. If animation is above or below visible area, it returns False.
There must be no problems with this function if the document if correctly formatted.
Post Reply