FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour GBmp GDIPLUS
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
GBmp GDIPLUS
Posted: Tue Feb 09, 2016 09:49 AM
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 ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: GBmp GDIPLUS
Posted: Tue Feb 09, 2016 01:19 PM
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 :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: GBmp GDIPLUS
Posted: Wed Feb 10, 2016 10:13 PM
Uwe,

I tried but at init run ok the transparent





then when I call the animation all is wrong

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: GBmp GDIPLUS
Posted: Sat Feb 13, 2016 11:47 AM

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 :D

Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: GBmp GDIPLUS
Posted: Sun Feb 14, 2016 05:22 PM
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.

Continue the discussion