browser inconsistency in HTML5
Monkey Forums/Monkey Bug Reports/browser inconsistency in HTML5
| ||
| Calling DrawImageRect with scale factors of zero breaks subsequent draw operations in that frame render on at least some versions of Iceweasel/Firefox. The following simplified example app (http://spikycaterpillar.com/monkey/test.build/html5/MonkeyGame.html) --
Import mojo
Class Test Extends App
Field img:Image
Field s$ = ""
Method OnCreate()
img = LoadImage("windowframe.png")
End
Method OnRender()
Cls(255,255,0)
DrawImageRect(img,100,100,0,0,50,50,
0,1.0,1.0)
DrawImageRect(img,100,150,50,0,20,50,0,0,1.0)
DrawImageRect(img,100,150,78,0,50,50,0,1.0,1.0)
If s Then
Print s
s = ""
End
End
Method OnUpdate()
If KeyHit(KEY_F10) Then s = "F10"
End
End
Function Main%()
Local test := New Test
SetUpdateRate(30)
End
-- will draw two pieces of the image on Chromium (13.0.782.220 (Developer Build 99552 Linux)), but only the first corner on Iceweasel 10.0.7 (an unbranded version of Firefox that Debian ships.) and Firefox 15.0.1 on Windows. |