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 ?
GBmp GDIPLUS
- Silvio.Falconi
- Posts: 7136
- Joined: Thu Oct 18, 2012 7:17 pm
- Been thanked: 1 time
GBmp GDIPLUS
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
I use : FiveWin for Harbour November 2023 - January 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
Re: GBmp GDIPLUS
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
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.
i work with FW.
If you have any questions about special functions, maybe i can help.
- Silvio.Falconi
- Posts: 7136
- Joined: Thu Oct 18, 2012 7:17 pm
- Been thanked: 1 time
Re: GBmp GDIPLUS
Uwe,
I tried but at init run ok the transparent

then when I call the animation all is wrong

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 November 2023 - January 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
I use : FiveWin for Harbour November 2023 - January 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
Re: GBmp GDIPLUS
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
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

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.
i work with FW.
If you have any questions about special functions, maybe i can help.
Re: GBmp GDIPLUS
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.
i work with FW.
If you have any questions about special functions, maybe i can help.