Problem Using DC_BitmapTransparentColor with DCPUSHBUTTONXP

This forum is for eXpress++ general support.
Message
Author
User avatar
digitsoft
Posts: 451
Joined: Thu Jan 28, 2010 1:33 pm
Location: Republica Dominicana
Contact:

Problem Using DC_BitmapTransparentColor with DCPUSHBUTTONXP

#1 Post by digitsoft »

hello Roger
because if I am using DC_BitmapTransparentColor({255, 255, 255}) in DCPUSHBUTTONXP CAPTIONARRAY the photos are not transparent
Attachments
Captura.JPG
Captura.JPG (78.25 KiB) Viewed 12831 times
Nolberto Paulino
Regards

User avatar
rdonnay
Site Admin
Posts: 4722
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Problem Using DC_BitmapTransparentColor with DCPUSHBUTTO

#2 Post by rdonnay »

I think this is an Xbase++ problem.

Are you saying that only {255,255,255} has the problem?
The eXpress train is coming - and it has more cars.

User avatar
digitsoft
Posts: 451
Joined: Thu Jan 28, 2010 1:33 pm
Location: Republica Dominicana
Contact:

Re: Problem Using DC_BitmapTransparentColor with DCPUSHBUTTO

#3 Post by digitsoft »

I'm using this color for transparency {255,255,255} but it doesn't work for me


DC_BitmapTransparentColor( {255, 255, 255} )
@ 0.01+xRow,nCol+0.2+xCol DCPUSHBUTTONXP ;
CAPTIONARRAY aCaptions ;
SIZE 13.51, 4.35 ;
COLOR GRA_CLR_WHITE, aMenuVtaRapida[5] ; && GraMakeRGBColor({30,144,255}) ;
MOUSECOLOR GRA_CLR_BLACK, GraMakeRGBColor({245,205, 75}) ; && GraMakeRGBColor({30,144,255}) ;
MOUSEFONT '11.Calibri Bold' ;
BORDERCOLOR GRA_CLR_BLACK ;
ACTION PushMe( aApp,aMenuVtaRapida[1] ) ;
WHEN _When( aApp, !EMPT(aMenuVtaRapida[1]) ) ;
TOOLTIP aMenuVtaRapida[2] ;
PARENT oToolBarTop ;
MESSAGE aMenuVtaRapida[2] INTO oMsgBox




rdonnay wrote:I think this is an Xbase++ problem.

Are you saying that only {255,255,255} has the problem?
Nolberto Paulino
Regards

User avatar
Tom
Posts: 1165
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: Problem Using DC_BitmapTransparentColor with DCPUSHBUTTO

#4 Post by Tom »

Any chance to turn those bitmaps into icons, Nolberto? This works ways better.

Your bitmaps may get scaled, and that can have effects to the color pattern.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
digitsoft
Posts: 451
Joined: Thu Jan 28, 2010 1:33 pm
Location: Republica Dominicana
Contact:

Re: Problem Using DC_BitmapTransparentColor with DCPUSHBUTTO

#5 Post by digitsoft »

Thanks tom
Because of your Answer, I cannot do this option because that photo is what the user assigned to the Product and can change.
Tom wrote:Any chance to turn those bitmaps into icons, Nolberto? This works ways better.

Your bitmaps may get scaled, and that can have effects to the color pattern.
Nolberto Paulino
Regards

User avatar
rdonnay
Site Admin
Posts: 4722
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Problem Using DC_BitmapTransparentColor with DCPUSHBUTTO

#6 Post by rdonnay »

Code: Select all

I cannot do this option because that photo is what the user assigned to the Product and can change.
If your customer is the creator of the bitmap, then there is nothing that you can do to handle transparency.
The transparent color is determined by the creator of the bitmap.

You are adding to the complexity of your program by requiring that background colors be transparent.
I suggest that you paint the bitmaps on the buttons in the way that the customer creates the bitmaps.
The eXpress train is coming - and it has more cars.

User avatar
digitsoft
Posts: 451
Joined: Thu Jan 28, 2010 1:33 pm
Location: Republica Dominicana
Contact:

Re: Problem Using DC_BitmapTransparentColor with DCPUSHBUTTO

#7 Post by digitsoft »

Thanks Roger
for his answer but I tell the client to put a white background on the maps
but it does not work.

rdonnay wrote:

Code: Select all

I cannot do this option because that photo is what the user assigned to the Product and can change.
If your customer is the creator of the bitmap, then there is nothing that you can do to handle transparency.
The transparent color is determined by the creator of the bitmap.

You are adding to the complexity of your program by requiring that background colors be transparent.
I suggest that you paint the bitmaps on the buttons in the way that the customer creates the bitmaps.
Nolberto Paulino
Regards

User avatar
rdonnay
Site Admin
Posts: 4722
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Problem Using DC_BitmapTransparentColor with DCPUSHBUTTO

#8 Post by rdonnay »

Send me one of the bitmaps that has the white background.
The eXpress train is coming - and it has more cars.

User avatar
digitsoft
Posts: 451
Joined: Thu Jan 28, 2010 1:33 pm
Location: Republica Dominicana
Contact:

Re: Problem Using DC_BitmapTransparentColor with DCPUSHBUTTO

#9 Post by digitsoft »

What the client does is copy the photo from the internet
I attach the Image
rdonnay wrote:Send me one of the bitmaps that has the white background.
Attachments
salsa linda.jpg
salsa linda.jpg (3.05 KiB) Viewed 12765 times
Nolberto Paulino
Regards

User avatar
Auge_Ohr
Posts: 1405
Joined: Wed Feb 24, 2010 3:44 pm

Re: Problem Using DC_BitmapTransparentColor with DCPUSHBUTTO

#10 Post by Auge_Ohr »

hi,

i have test your "salsa linda.jpg" and use this Code

Code: Select all

PROCEDURE Main
LOCAL oBMP, cTitle := "test"

   oBMP := XbpBitmap():new():create()
   oBMP:Loadfile("salsa linda.jpg")

   oBMP:transparentClr := oBmp:getDefaultBGColor()

   NewGFXDocument( oBMP, cTitle )
RETURN
and got this
BMP_Transparent.JPG
BMP_Transparent.JPG (15.5 KiB) Viewed 12758 times
greetings by OHR
Jimmy

Post Reply