Thanks for the example, it works so far!Andreas wrote:Normally you can create off-screen BGPics with CreateBGPic() but as you need a BGPic with an alpha channel, you have to create a brush first and then convert it to a BGPic. The code goes something like this:fingus wrote:How to create an offscreen BGPic?
Is the meaning of offscreen here, drawing to a non-visible-area (left, top, down, right of the actual screen) or is this something like a double-buffered area?
The Manual didn't describe this and even the Example of BGPic there doesn't work and ends up with a "Didn't find Background-Picture 2".
Code: Select all
tmp = CreateBrush(Nil, 640, 480, 0, {AlphaChannel = True, Clear = True}) tmp2 = BrushToBGPic(tmp, Nil) FreeBrush(tmp) SelectBGPic(tmp2, #SELMODE_COMBO) ....draw to it... EndSelect DisplayBGPic(tmp2)
But this happen when try to put some Alpha-Channel images above another:

the smaller applebrush don't use the first mentioned brush as background!??
Code: Select all
...
SelectBGPic(tmp2, #SELMODE_COMBO)
DisplayBrush(0,#CENTER,#CENTER)
DisplayBrush(1,400,400) ;add smaller apple above background
TextOut(200,200,"hello world!!!!!!!!!!!!!!!!!!")
Box(50,50,100,100, #BLUE)
EndSelect
DisplayBGPic(tmp2)
...