Page 1 of 1

DrawAlphaImage with DrawingMode(#PB_2DDrawing_AlphaBlend)

Posted: Sun Dec 28, 2025 2:09 am
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

Re: DrawAlphaImage with DrawingMode(#PB_2DDrawing_AlphaBlend)

Posted: Sun Dec 28, 2025 4:20 am
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