Uncaught TypeError: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': No function was found that matched the signature provided.
Code: Select all
Global DisplayWidth.i = 0, DisplayHeight.i = 0
Procedure RenderFrame()
ClearScreen($000077)
DisplaySprite(1, 20, 20 )
FlipBuffers()
EndProcedure
ExamineDesktops()
DisplayWidth = DesktopWidth(0) / 2
DisplayHeight = DesktopHeight(0) /2
OpenWindow (0, 0, 0, DisplayWidth, DisplayHeight, "", #PB_Window_ScreenCentered | #PB_Window_BorderLess)
OpenWindowedScreen(WindowID(0), 0, 0, DisplayWidth, DisplayHeight, 0, 0, 0)
SetFrameRate(3)
BindEvent(#PB_Event_RenderFrame, @RenderFrame())
CreateImage(0, 32, 48)
StartDrawing(ImageOutput(0))
Circle(0,0,16, $ff0000)
StopDrawing()
CreateSprite(1, DisplayWidth, DisplayHeight)
StartDrawing(SpriteOutput(1))
DrawImage(0, 10, 10) ; <-- comment this out and it works
Box(50, 50, 50, 50, $ffffff)
StopDrawing()
FlipBuffers(); // start the rendering