I have a picture object and can set a backdrop picture and put my own drawings on top of it. Now I would like to have a png-picture (with transparency) to be placed on top of the backdrop picture, in order to get a new picture. Lets say a nice picture with my graphic logo placed on it. Can anybody give me a hint how to do this ?
so you would replace the picture backdrop propertie with a new picture at runtime?
u can’t draw all in the paint event?
logo is a picture in the ide.
Sub Paint(g As Graphics, areas() As REALbasic.Rect) Handles Paint
g.drawPicture(logo,0,0,g.width,g.height,0,0,logo.width,logo.height)
End Sub
a. You modify your images (whatever they really are: photos, scans, artwork) in offscreen Picture,
b. You draw them into screen: all in Backdrop or one of them in Backdrop and the other(s) in Paint, so you can watch what youre doing and same everything in a single (another) Offscreen picture to disk (or print or pdf).
I hope I recall correctly who is frontmost (.Paint Event ?) and who is Background (Backdrop Property ?).
Of course, depending on the image size, this may need memory.
guess I am missing the crux of your question.
dim p as new picture( .... size....)
dim g as graphics = p.graphics
g.drawpicture basepic,0,0
g.drawpicture overlay,0,0
g.drawpicture logo, 100,100,logo.width,logo.height, 0,0,logo.width,logo.height
assuming overlay and logo are masked as required
@Dave S : so easy. I should have known better. Sometimes a programmer can think just to complicated. Thx.