Decreasing a static image progress bar horizontally in SDL In my project, I have a decreasing timer progress bar PNG image on display. This image and its background can be found at the below link: https://s3.eksiup.com/df7dd38f781.png My goal is to make the bar decrease starting from the upper green side to the lower red side. My code for this is the following: void EntityTimer::OnRender(SDL_Renderer *ren) { SDL_Rect currRect,dstRect; double rem=0.0; memcpy(&currRect,&origRect,sizeof (SDL_Rect)); memcpy(&dstRect,&origRect,sizeof (SDL_Rect)); if (timerObjPtr->remainingDuration>timerObjPtr->durationInMilisec) timerObjPtr->durationInMilisec=timerObjPtr->remainingDuration; rem=((double)timerObjPtr->remainingDuration/timerObjPtr->durationInMilisec); currRect.h=(origRect.h)*rem; currRect.h = currRect.h; dstRect.x=0; dstRect.y=0; dstRect.h=currRect.h...