graphics

Stulish

Active Member
Licensed User
Longtime User
Is there a way to load one PNG file over another.

I have a PNG file called "block" and another called "S"

What i want is the block to be the background and the S to be in the foreground as a kind of merged PNG.

is this possible?

Or will i have to have one image view on top of another with the 'block' image loaded in to the imageview at the rear and the 'S' image loaded into the foremost imageview?

Thanks
 

Stulish

Active Member
Licensed User
Longtime User
the PNG backgrounds are transparent so should be ok.

so would i have to initialize a Rect and then draw one bitmap onto the canvas and then the other and finally invalidate the imageview to get it to redraw?

Something like:

B4X:
Dim cvs As Canvas,rd As Rect 
rd.Initialize(0,0,imageView1.Width,imageView1.Height)
cvs.DrawBitmap(LoadBitmap(File.DirAssets, "block.png"),Null,rd)
cvs.DrawBitmap(LoadBitmap(File.DirAssets, "s.png"),Null,rd)
imageview1.Invalidate

Im not on my B4A laptop at the moment so cant try it

Thanks

Stu
 
Upvote 0

Stulish

Active Member
Licensed User
Longtime User
Ah didn't think about that.

Thanks, i will check it when i am back at my laptop

:sign0060:
 
Upvote 0
Top