FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Pngs not transparent
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Pngs not transparent
Posted: Wed Mar 02, 2016 09:10 AM
I insert on a folder a image
oImagen = TImage():Define(,"scaf.bmp" )
...

oGrid:adialogs[1]:bPainted := {|hDC| (PalBmpDraw( hDC, 0, 0, oImagen:hBitmap,, oGrid:adialogs[1]:nWidth, oGrid:adialogs[1]:nHeight,, .T.) ) }

and on this folder many btnbmp buttons with png file

@ nrow,ncol btnbmp oBtn[n] Filename aBmp[RA->RACOLORE] ;
SIZE nsizeW,nsizeh ;
Prompt str2lines(alltrim(Ra->Radesc)," ") ;
noborder CENTER;
font ofontsmall of oGrid:adialogs[1] ;
Action NIL

oBtn[n]:lTransparent:=.T.
oBtn[n]:= cCursor







How you can see the buttons are not transparent ... why ?
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: Pngs not transparent
Posted: Wed Mar 02, 2016 10:06 AM
Silvio,

it seems, Your images are NOT transparent ( white background ) ?

I can check them for You if You want

Can You check with my testbuttons ( premultiplied alpha ) ?
If You like it, I can create them with any color You need ( 3D - style )





My FOLDER-test.
Like You can see NO PROBLEM



@ 50, 50 BTNBMP oBtn[1] OF oFld1:aDialogs[3] ;
SIZE 70, 70 PIXEL TRANSPARENT ;
NOBORDER ;
FILENAME c_path1 + "Testbtn1.Png" ;
ACTION MsgAlert( "Buttontest" ) ;
CENTER


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: Pngs not transparent
Posted: Wed Mar 02, 2016 11:57 AM

Uwe,
I tried and not run
I sent you a snapshot

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: Pngs not transparent
Posted: Wed Mar 02, 2016 04:41 PM
Silvio,

I tested with ALL possible folder-page-backgrounds
I couldn't find any problem.
Maybe my Testtool can help. I will give You a download-link



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: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Pngs not transparent
Posted: Wed Mar 02, 2016 09:30 PM
Silvio,

A IMAGETEST



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: Pngs not transparent
Posted: Wed Mar 02, 2016 10:42 PM

I think the problem is i use a folder aand on this folder i use a panel because i must scroll it and on hi i have a bmp and on this bmp i insert btnbmp buttons made with png

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: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Pngs not transparent
Posted: Thu Mar 03, 2016 08:39 AM
Uwe,

here not run ok




I saw :

if the PNG FILE is used as IMAGE control it is transparent

if the PNG FILE is used as btnbmp control it is not transparent!!!!

I sent you my test sample with your png file
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: Pngs not transparent
Posted: Thu Mar 03, 2016 10:37 AM
Silvio,

I will send You Your EXTENDED test with the needed changes



Do You still need some more buttons with different colors ?
I can create any color You like
brighter or darker or different gradient painting







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: Pngs not transparent
Posted: Thu Mar 03, 2016 10:56 AM

Uwe ,
I need with the models I sent you

here not arrived your new test

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: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Pngs not transparent
Posted: Fri Mar 04, 2016 10:26 AM

Uwe,
how I can show png transparent as you test ?

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: Pngs not transparent
Posted: Fri Mar 04, 2016 11:45 AM
Silvio,

I still wanted to include some images

each color
1 Button
1 small file
1 big file

include colors

white
black
green
red
blue
purple
yellow
sill more ?



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: Pngs not transparent
Posted: Fri Mar 04, 2016 12:14 PM

I need 10 colors type

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: Pngs not transparent
Posted: Sat Mar 05, 2016 03:18 PM

Silvio,

have a look at Your emails
The new sample is not completed for the moment ( resources to be added )
but includes all informations You are looking for.

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.

Continue the discussion