Draw.Image() opacity argument works as expected now.

[GB.SDL2]
* BUG: Draw.Image() opacity argument works as expected now.
This commit is contained in:
gambas 2019-01-05 18:13:08 +01:00
parent a584969d0e
commit d51800f858

View file

@ -331,7 +331,7 @@ BEGIN_METHOD(Draw_Image, GB_OBJECT image; GB_INTEGER x; GB_INTEGER y; GB_INTEGER
SDL_RenderCopy(RENDERER, texture, rect, &dest);
else
{
SDL_SetTextureAlphaMod(texture, 255 - VARGOPT(opacity, 1.0) * 255);
SDL_SetTextureAlphaMod(texture, VARGOPT(opacity, 1.0) * 255);
SDL_RenderCopyEx(RENDERER, texture, rect, &dest, VARGOPT(angle, 0.0), NULL, SDL_FLIP_NONE);
SDL_SetTextureAlphaMod(texture, 255);
}