2020-10-27 06:39 AM
Hello,
I'm currently developing an application on a STM32H753VT6 with touchGFX and I have an issue with an animatedImage Widget. I want to create a gif with 12 bells images.
The problem is that the bottom of the animation is (sometimes partially) missing as you can see there :
I've already done this animation on another project without any problem but on my main application it doesn't work.
Here is the code creating the animated gif :
animatedImageBell.setXY(0, 0);
animatedImageBell.setBitmaps(BITMAP_CLOCHE00116_ID, BITMAP_CLOCHE00127_ID);
animatedImageBell.setUpdateTicksInterval(NB_TICKS_UPDATE_INTERVALS);
add(animatedImageBell);
and the code to start and stop the animation (I'm not using a loop because the animation is not nice)
if(start_bell_shaking == true)
{
if(init_start_bell_shaking_done == false)
{
// here we replace the bell by the animatedImageBell
animatedImageBell.setXY(zoomAnimationBell.getX() - OFFSET_BELL_X_POSITION, zoomAnimationBell.getY() - OFFSET_BELL_Y_POSITION);
// set animatedImageBell at the same position as zoomAnimationBell)
zoomAnimationBell.setVisible(false);
zoomAnimationBell.invalidate();
box_demo_anim_bell.setVisible(true);
box_demo_anim_bell.invalidate();
init_start_bell_shaking_done = true;
}
animatedImageBell.stopAnimation();
// no reverse order, no reset, no loop
animatedImageBell.startAnimation(false, false, false);
start_bell_shaking = false;
}else{
if(delay_start_bell_shaking == NB_IMAGES_SHAKING_BELL * NB_TICKS_UPDATE_INTERVALS + DELAY_BETWEEN_TWO_SHAKING_BELL_ANIMATION)
{
start_bell_shaking = true;
delay_start_bell_shaking = 0;
}else{
delay_start_bell_shaking++;
}
}
What can cause this issue ?
Regards
AJT141
PS : i've enabled cache flush as mentionned in Lab Startup Project Setup PDF document
PS2 : There are no more glitches for the bell when I add a blue box under the bell
Solved! Go to Solution.
2020-11-09 12:35 AM
2020-10-27 06:58 AM
Hi,
In your PS2 you say that putting a box under solved the issue, I assume the bell images had transparency ? Does this fix solve entirely your issue ?
/Romain
2020-10-27 07:05 AM
Hello,
No transparency for bell images, I just took the 12 images given by the designer of the application.
Yes, adding the box solved the problem but I prefer to find where the problem comes from instead hidding it.
Thanks again,
AJT
2020-10-28 04:09 AM
Hi,
Could you share your images to see if I can replicate your issue with your code (even if using a different board).
/Romain
2020-10-28 04:13 AM
2020-11-09 12:35 AM