GBmp GDIPLUS

GBmp GDIPLUS

Postby Silvio.Falconi » Tue Feb 09, 2016 9: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 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
User avatar
Silvio.Falconi
 
Posts: 6832
Joined: Thu Oct 18, 2012 7:17 pm

Re: GBmp GDIPLUS

Postby ukoenig » Tue Feb 09, 2016 1: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 )

Image

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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: GBmp GDIPLUS

Postby Silvio.Falconi » Wed Feb 10, 2016 10:13 pm

Uwe,

I tried but at init run ok the transparent

Image



then when I call the animation all is wrong

Image
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
User avatar
Silvio.Falconi
 
Posts: 6832
Joined: Thu Oct 18, 2012 7:17 pm

Re: GBmp GDIPLUS

Postby ukoenig » 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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: GBmp GDIPLUS

Postby ukoenig » Sun Feb 14, 2016 5: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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 30 guests