View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002851 | JEDI VCL | 00 JVCL Components | public | 2005-04-08 09:26 | 2005-08-09 07:18 |
| Reporter | anonymous | Assigned To | |||
| Priority | normal | Severity | major | Reproducibility | always |
| Status | closed | Resolution | open | ||
| Product Version | 3.00 | ||||
| Target Version | Fixed in Version | ||||
| Summary | 0002851: TJvGifAnimator flickers like a civ | ||||
| Description | Pardon the summary, but I've had too little sleep. Basically, whenever using TJvGifAnimator, in any situation where you are animating a not-tiny image, it flickers very very badly. This is even shown in the example JvGIFAnimator included with the JVCL. I've tried everything, but nothing seemed to effect it. Until I stared to dive into the code a little. Basically, I found that line 290 of JvAnimatedImage, FillRect(Bounds(0, 0, ClientWidth, ClientHeight)); Is the line creating the flicker. Removing that line, removes the flicker. So far I've been unable to find what purpose that line holds, as moments later DoPaintImage is about to whipe out the content of the Canvas anyway with its draw routine. Perhaps I'm confused, but removing this unused line seems to fix the problem. If this is not the case, please correct me as I wouldn't want broken code in my apps (altho, perhaps the flickering I see is worse). -Adam Laforge | ||||
| Tags | No tags attached. | ||||
|
|
Sorry, I should add that this is line 290 of JvAnimatedImage.pas. I suspect this may have some kind of effect on other Jedi image components, but I know this has a horrible effect on TJvGifAnimator. -Adam Laforge |
|
|
Ok, this is my last addition before someone else adds something, I swear. Looking over the rest of the JVCL source, it appears only TJvGifAnimator and JvSplashWindow use this unit, so as far as I can see, it's only going to help the situation. I'm not the expert though, so I await those who are to correct me :) -Adam Laforge |
|
|
Wow, this is becoming a mess of notes. I found what this line is for. An image with a transparent background can cause a very bad redraw bug without this line. However, this is no better/worse than the other way with flicker at all times. I'm out of ideas. Anyone got something? :) -Adam Laforge |
|
|
Nothing for your bug, but please register for an account, login then monitor this bug so that you will get email updates on it. |
|
|
> Anyone got something? :) Why not modify the code so FillRect is called only if the image is transparent? |
|
|
ACtually, the FillRect call should be removed from TJvImageControl.PaintImage altogether: a base (abstract to boot) class should not make any assumptions of the usability of such code. Instead, it should be added to the overridden TJvAnimatedImage.DoPaintImage: ... {$IFDEF VCL} if Transparent then begin with Canvas do begin Brush.Color := Color; FillRect(Bounds(0, 0, ClientWidth, ClientHeight)); end; CopyParentImage(Self, Canvas); end; {$ENDIF VCL} ... This way, the control that is actually responsible for drawing the image does the entire drawing without interference from a base class. |
|
|
Was away for a few days, so I haven't been able to check on this. I agree completely with peter3 that the code should be moved. This at the very least fixes the flicker when not using transparancy. However, even after such changes with transparancy on it still flickers horribly. Does anyone have any ideas? :) I'd like to use this component in one of my projects, but such flicker can't be used in any production project. -Adam Laforge |
|
|
As usual, I'm on here past my bedtime. Please note that this same change would apply to TJvGIFAnimator.DoPaintImage which is where I'm having these problems with. It seems something in CopyParentImage() is causing the flicker problem, as if it's not respecting the existing fill and forcing the draw to screen, then erasing again itself. -Adam Laforge |
|
|
No answers for too long, closing the issue. Please post a new one if need be. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2005-04-08 09:26 | anonymous | New Issue | |
| 2005-04-08 09:37 | anonymous | Note Added: 0006870 | |
| 2005-04-08 09:55 | anonymous | Note Added: 0006871 | |
| 2005-04-08 10:25 | anonymous | Note Added: 0006872 | |
| 2005-04-12 00:37 | obones | Note Added: 0006903 | |
| 2005-04-12 02:38 |
|
Note Added: 0006915 | |
| 2005-04-12 02:51 |
|
Note Added: 0006919 | |
| 2005-04-19 02:30 | anonymous | Note Added: 0007025 | |
| 2005-04-19 03:02 | anonymous | Note Added: 0007026 | |
| 2005-08-09 07:18 | obones | Status | new => closed |
| 2005-08-09 07:18 | obones | Note Added: 0007739 |