Brew Question: Download Questions PDF
How to control animation by time?
![Brew Interview Answer Brew Interview Question](https://globalguideline.com/public/images/interview/26.png)
Answer:
One way to do this is to use the IImage interface and set the rate of animation (IImage_SetParm). An example in which the animation rate is set to 750ms is shown below:
IIMAGE_SetParm(pMe->m_pIImage, IPARM_RATE, 750, 0);
You can also use a timer to trigger the image display function. Use ISHELL_SetTimer() to set a timer:
ISHELL_SetTimer(pMe->a.m_pIShell, TIMER_RATE,
(PFNNOTIFY)(ManipulateBitmap), pMe);
After TIMER_RATE ms expires, ManipulateBitmap function will be triggered, within which you can manipulate your image.
IIMAGE_SetParm(pMe->m_pIImage, IPARM_RATE, 750, 0);
You can also use a timer to trigger the image display function. Use ISHELL_SetTimer() to set a timer:
ISHELL_SetTimer(pMe->a.m_pIShell, TIMER_RATE,
(PFNNOTIFY)(ManipulateBitmap), pMe);
After TIMER_RATE ms expires, ManipulateBitmap function will be triggered, within which you can manipulate your image.
Download Brew Interview Questions And Answers
PDF
Previous Question | Next Question |
Does BREW support animation? | Can you please explain the difference between Multi-tap and T9 text entry modes for text input? |