DrawAlphaImage with DrawingMode(#PB_2DDrawing_AlphaBlend)

Just starting out? Need help? Post your questions and find answers here.
RSrole
User
User
Posts: 76
Joined: Fri Apr 29, 2022 8:27 pm

DrawAlphaImage with DrawingMode(#PB_2DDrawing_AlphaBlend)

Post by RSrole »

For the heck of it, I wrote a simple slide show program that reads the images of a folder and creates a window the size of the desktop and uses something like the following to dissolve (TV term for smooth transition) from the last image to the next one.

It works perfectly in Windows, but doesn't seem to work in Mac osx. Here's the relevant part of the code:

Code: Select all

	; this gets called with a timer event
  If StartDrawing(WindowOutput(window_0))
      DrawingMode(#PB_2DDrawing_AlphaBlend)
      For i = 0 To 255 
        DrawAlphaImage(ImageID(img), 0,0, i)
      Next
    StopDrawing() 
  EndIf
img is loaded from a list of images and there is code to check if it's valid. I can do

Code: Select all

      DrawingMode(#PB_2DDrawing_Default)
      DrawImage(ImageID(img), 0,0)
in the mac and it works find, but it's just a cut to the next image.

Is it a bug in the Mac compiler or am I doing something wrong?

thanks,
Russ
RSrole
User
User
Posts: 76
Joined: Fri Apr 29, 2022 8:27 pm

Re: DrawAlphaImage with DrawingMode(#PB_2DDrawing_AlphaBlend)

Post by RSrole »

Okay,

with a little further reading, I found that the way I was doing it really isn't supposed to work at all. But it does in windows that that was why I was confused. The proper way to do this is to use sprites. All is well

Thanks
Post Reply