It has become apparent that I will need to use roScreen in my program instead of roImageCanvas
in order to speed up my program, regarding layer in roImageCanvas, use the setLayer, clearLayer and swapLayer
but when i am using roScreen how i will remove layer that is in top or middle without remove the first layer.
I am giving code in that i want to remove middle layer that i.e "pkg:/images/2.jpg
sub main()
screen=createobject("roscreen",true)
'screen.setalphaenable(false)
screen.setalphaenable(true)
image1=createobject("robitmap","pkg:/images/1.jpg")
image2=createobject("robitmap","pkg:/images/2.jpg")
image3=createobject("robitmap","pkg:/images/3.jpg")
'lets set up some positions for these images:
obj1={posx:100,posy:100}
obj2={posx:200,posy:200}
obj3={posx:300,posy:300}
timer=createobject("rotimespan")
timer.mark()
while true
screen.setalphaenable(true)
screen.clear(&h000000ff)
screen.drawobject(obj1.posx,obj1.posy,image1)
screen.setalphaenable(false)
screen.drawobject(obj2.posx,obj2.posy,image2)
screen.setalphaenable(false)
screen.drawobject(obj3.posx,obj3.posy,image3)
screen.swapbuffers()
end while
end sub
Any suggestions?