Dubbsta
Active member
- Joined
- Jul 13, 2017
- Messages
- 208
im not sure what the use for createimage , writepixels and readpixels are for or how to use them but this didnt work for me...cant make much sense of the docs and dont know how to set the argb can someone please enlighten me thx.
is this how to change pixels on an image?
is this how to change pixels on an image?
Cerberus:
Strict
Import mojo
Class test Extends App
Field pad:Image
Field pix:Int[40*40]
Field img:Image
Method OnCreate:Int()
SetUpdateRate(60)
pad = LoadImage("pad.png")
img = CreateImage(40,40)
Return 0
End
Method OnUpdate:Int()
ReadPixels(pix,40,40,40,40)
Return 0
End
Method OnRender:Int()
Cls 0,0,0
DrawImage(pad,40,40)
img.GrabImage(100,100,40,40)
Return 0
End
End
Function Main:Int()
New test()
Return 0
End