Image refusing to draw
Posted: Sat Mar 08, 2025 3:53 pm
I have a draw image command that is not very.... commanderly. It refuses to draw. The box draw works fine.
I used IsImage and BatterySequence(0) is a valid non-zero number. I checked it's width and height and they check out perfect. I used SaveImage and the resulting image saves fine and looks beautiful. PureBasic just doesn't want to draw it. Any ideas?
Code: Select all
Event = WaitWindowEvent()
UsePNGImageDecoder()
;FlipBuffers()
StartDrawing(WindowOutput(WindowNum))
DrawingMode(#PB_2DDrawing_Default)
Box(0, 0, GameX, GameY, RGB(0, 0, 0))
DrawImage(BatterySequence(0), 0, 0)
StopDrawing()
If Event = #PB_Event_CloseWindow
EndProgram()
EndIf