Page 1 of 1
GBmp GDIPLUS
Posted: Tue Feb 09, 2016 9:49 am
by Silvio.Falconi
I use Gbmp class to load a PNG FILE
and I use drawimage to show the image
oGraphics:DrawImage( aImages[i] , 1, aPos[i] )
the background of the image is white
how I can make to make it transparent ?
oPen := Pen():New( 255, 0, 0, 255 ) // nTransparency, nRed, nGreen, nBlue
where I must insert oPen ?
Re: GBmp GDIPLUS
Posted: Tue Feb 09, 2016 1:19 pm
by ukoenig
Silvio,
I tested all possible combinations.
I couldn't find any painting-problem.
Transparent PNG on image, lines, ellipse, rects ....
colored circles with defined transparent works as well ( red border with green )

best regards
Uwe

Re: GBmp GDIPLUS
Posted: Wed Feb 10, 2016 10:13 pm
by Silvio.Falconi
Uwe,
I tried but at init
run ok the transparent 
then when I call
the animation all is wrong 
Re: GBmp GDIPLUS
Posted: Sat Feb 13, 2016 11:47 am
by ukoenig
Silvio,
on init the first positions of the images are shown.
Next You move the images on a painted background of the images shown at startup.
Because the images are transparent, the not covered images BEHIND the new ones are shown.
It will only work, if You RESTORE the original brush of the window or dialog inside the used area
BEFORE painting new images.
Using Your sample, You can REFILL the used area with green, before painting the new images.
It can be a colored bitmap ( green ) with the size of the used area.
A other solution : a colored background of the images ( green )
It can be done easy with PIXELFORMER.
best regards
Uwe

Re: GBmp GDIPLUS
Posted: Sun Feb 14, 2016 5:22 pm
by ukoenig