Hi all, I'm getting some weird behaviour with DrawLine. I noticed that 0,0 is actually off screen when it should be visible and 640,640 is on-screen but it should not be visible.
Also check out the 3rd line I'm drawing below, it should be diagonal with a step in the middle but it is straight. The 4th line is diagonal but only has 1 step instead of the expected 2 steps.
If you run it in HTML mode it appears to work OK although it's hard to tell as the lines are anti-aliased.
Import mojo
Function Main:Int()
New MyApp
Return 1
End
Class MyApp Extends App
Method OnCreate:Int()
'Set frame rate
SetUpdateRate 60
Return 1
End Method
Method OnUpdate:Int()
Return 1
End Method
Method OnRender:Int()
Cls(0,0,0)
DrawLine 0,0,0,100
DrawLine 640,0,640,100
DrawLine 1,150,2,250
DrawLine 1,300,3,400
Return 1
End Method
End Class
|