bitmaps trasparents
- MdaSolution
- Posts: 401
- Joined: Tue Jan 05, 2010 2:33 pm
bitmaps trasparents
I must put a bitmap no alpha near to another ...with design clausole on white background
sample :
@ nRow, nCol BITMAP oBJ;
RESOURCE cBitmap;
PIXEL NOBORDER of oDlg TRANSPARENT
oBj:lTransparent = .T.
oBj:HideDots()
oSprite:lDrag := .T.
the problem is the bmp is not transparent and when I put the bmp near to another the second bmp erase the first
I saw the game.prg and there the bmp is trransparent why ?
sample :
@ nRow, nCol BITMAP oBJ;
RESOURCE cBitmap;
PIXEL NOBORDER of oDlg TRANSPARENT
oBj:lTransparent = .T.
oBj:HideDots()
oSprite:lDrag := .T.
the problem is the bmp is not transparent and when I put the bmp near to another the second bmp erase the first
I saw the game.prg and there the bmp is trransparent why ?
FWH .. BC582.. xharbour
Re: bitmaps trasparents
MdaSolution,
Check the size of the BITMAP CONTROL/BITMAP. Remove the clause NOBORDER so that you will understand how the BMP is displayed by the control. Once you fix the problem you can use the NOBORDER clause
Regards
Anser
when I put the bmp near to another the second bmp erase the first
Check the size of the BITMAP CONTROL/BITMAP. Remove the clause NOBORDER so that you will understand how the BMP is displayed by the control. Once you fix the problem you can use the NOBORDER clause
Regards
Anser
- Daniel Garcia-Gil
- Posts: 2365
- Joined: Wed Nov 02, 2005 11:46 pm
- Location: Isla de Margarita
- Contact:
Re: bitmaps trasparents
Hello Mda
please check this post http://forums.fivetechsupport.com/viewtopic.php?p=95372#p95372
the transparences come from brush parent not from image background or over other image
please check this post http://forums.fivetechsupport.com/viewtopic.php?p=95372#p95372
the transparences come from brush parent not from image background or over other image
our best documentation is the source code
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
- MdaSolution
- Posts: 401
- Joined: Tue Jan 05, 2010 2:33 pm
Re: bitmaps trasparents
Daniel,
I trying that sample your test but
it is wrong because when you move an object it not erase the background
Do you Know roomaranger application ? http://www.roomarranger.com/
the sample game.prg of fwh make the ball transparent
I trying that sample your test but
it is wrong because when you move an object it not erase the background
Do you Know roomaranger application ? http://www.roomarranger.com/
the sample game.prg of fwh make the ball transparent
FWH .. BC582.. xharbour
Re: bitmaps trasparents
BMP-Replace in Tile-Style ( maybe some Informations to help ) :
![Image](http://www.pflegeplus.com/pictures/bmpreplace.jpg)
A given BMP replaced with others in Tile-Style :
Best Regards
Uwe![Laughing :lol:](./images/smilies/icon_lol.gif)
![Image](http://www.pflegeplus.com/pictures/bmpreplace.jpg)
A given BMP replaced with others in Tile-Style :
Code: Select all | Expand
// The Resource :
REDEFINE BITMAP oBMP4 ID 340 ADJUST RESOURCE "Blanc" OF oDlg // any Resource will be replaced with new BMP
oBMP4:bPainted := {|hDC| DRAW_BTILE( oBMP4, hDC, oTextfont, c_path + "\images\USER.BMP", ;
"Text-Test", 0, 16777215 ) }
// ---------- Bitmap -TILED with Text if needed on a BMP-resource --------------
FUNCTION DRAW_BTILE( oBitmap, hDC, oTextfont, cBitmap, cTitle, nLeft, nTColor )
LOCAL oImage, nRow := 0, nCol := 0, n
IF FILE( cBitmap )
DEFINE BITMAP oImage FILENAME cBitmap
aRect := GETCLIENTRECT( oBitmap:hWnd )
nHeight := oImage:nHeight
nWidth := oImage:nWidth
IF aRect[3] > 0
DO WHILE nRow < aRect[3]
nCol = 0
DO WHILE nCol < aRect[4]
PalBmpDraw( hDC, nRow, nCol, oImage:hBitmap ) // oBitmap:GETDC()
nCol += nHeight
ENDDO
nRow += nWidth
ENDDO
ELSE
MsgAlert( "Not possible to use Picture " + CRLF + ;
cBitmap + CRLF + ;
"for TILED-selection !", "ATTENTION" )
ENDIF
// Part : Text define
// ---------------------
hOldFont := SelectObject( hDC, oTextFont:hFont )
nTXTLG := GettextWidth( hDC, cTitle )
nBMPLONG := oBitmap:Super:nWidth()
nBMPHIGHT := oBitmap:Super:nHeight()
nFONTHIGHT := oTextFont:nInpHeight * -1
IF nLEFT = 0
nLEFT := (nBMPLONG - nTXTLG) / 2
ENDIF
nNEWHIGHT := nFONTHIGHT
nTOP := (nBMPHIGHT - nNEWHIGHT) / 2
SetTextColor( hDC,nTColor)
SetBkMode( oBitmap:hDC, 0 )
TextOut( hDC, nTOP, nLEFT, cTitle )
oBitmap:ReleaseDC()
ELSE
IF !EMPTY(cBitmap)
MsgAlert( "File : " + cBitmap + CRLF + ;
"does not exist" + CRLF + ;
"to create Background !", "ATTENTION" )
ENDIF
ENDIF
RETURN( NIL )
Best Regards
Uwe
![Laughing :lol:](./images/smilies/icon_lol.gif)
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.
- Daniel Garcia-Gil
- Posts: 2365
- Joined: Wed Nov 02, 2005 11:46 pm
- Location: Isla de Margarita
- Contact:
Re: bitmaps trasparents
MdaSolution wrote:Daniel,
I trying that sample your test but
it is wrong because when you move an object it not erase the background
Do you Know roomaranger application ? http://www.roomarranger.com/
the sample game.prg of fwh make the ball transparent
Daniel Garcia-Gil wrote:the transparences come from brush parent not from image background or over other image
game.prg use BRUSH
Code: Select all | Expand
DEFINE BRUSH oBrush;
FILE "..\bitmaps\backgrnd\beach.bmp"
if you want bitmap transparent over other image ( no over brush ) you should seek in internet about transparency technique and use the bitmap handled for do that
our best documentation is the source code
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
- MdaSolution
- Posts: 401
- Joined: Tue Jan 05, 2010 2:33 pm
Re: bitmaps trasparents
sorry I not search to internet to see if I can make it ...
My question was ....
can make it with fwh ? yes or no ?
I think It can be done with fwh because I saw an application made with fwh of Apolo software : it create floor plan and use bitmap to create it
each bmps is tranparent and can be put near to another as you can see here :
![Image](http://img691.imageshack.us/img691/7501/errbmp.png)
My question was ....
can make it with fwh ? yes or no ?
I think It can be done with fwh because I saw an application made with fwh of Apolo software : it create floor plan and use bitmap to create it
each bmps is tranparent and can be put near to another as you can see here :
![Image](http://img691.imageshack.us/img691/7501/errbmp.png)
FWH .. BC582.. xharbour
- Daniel Garcia-Gil
- Posts: 2365
- Joined: Wed Nov 02, 2005 11:46 pm
- Location: Isla de Margarita
- Contact:
Re: bitmaps trasparents
Mda
yes i thinks you can.... but not with traditional class
maybe you need make you own function to paint sprite, from C level or PRG level
yes i thinks you can.... but not with traditional class
maybe you need make you own function to paint sprite, from C level or PRG level
our best documentation is the source code
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
- MdaSolution
- Posts: 401
- Joined: Tue Jan 05, 2010 2:33 pm
Re: bitmaps trasparents
Daniel,
Perhaps I found a solution
If I use Superbutton I can insert a bitmap near to another
I try with sbutton Release 7.0 But I think there is a problem because when I use design clause it draw the rectangule of checkdots bad
look it please :
![Image](http://img87.imageshack.us/img87/107/immaginezsx.jpg)
I use then an action to refresh the dialog ( and the bitmaps I drawing ) but it refresh also the ribbon and it make a flash on the dialog
Perhaps I found a solution
If I use Superbutton I can insert a bitmap near to another
I try with sbutton Release 7.0 But I think there is a problem because when I use design clause it draw the rectangule of checkdots bad
look it please :
![Image](http://img87.imageshack.us/img87/107/immaginezsx.jpg)
I use then an action to refresh the dialog ( and the bitmaps I drawing ) but it refresh also the ribbon and it make a flash on the dialog
FWH .. BC582.. xharbour
Re: bitmaps trasparents
Hi MDA:
I'll try to help, just send me a self contained sample program where I can reproduce that situation.
Best regards.
Manuel Mercado Gómez.
MdaSolution wrote:I try with sbutton Release 7.0 But I think there is a problem because when I use design clause it draw the rectangule of checkdots bad
I use then an action to refresh the dialog ( and the bitmaps I drawing ) but it refresh also the ribbon and it make a flash on the dialog
I'll try to help, just send me a self contained sample program where I can reproduce that situation.
Best regards.
Manuel Mercado Gómez.
manuelmercado at prodigy dot net dot mx
- MdaSolution
- Posts: 401
- Joined: Tue Jan 05, 2010 2:33 pm
Re: bitmaps trasparents
Manuel,
I sent you a message with test sample where you can see the error
I sent you a message with test sample where you can see the error
FWH .. BC582.. xharbour
Re: bitmaps trasparents
Hi mda:
Got nothing, please resend it.
Best Regards.
Manuel Mercado Gómez.
MdaSolution wrote:I sent you a message with test sample where you can see the error
Got nothing, please resend it.
Best Regards.
Manuel Mercado Gómez.
manuelmercado at prodigy dot net dot mx
- MdaSolution
- Posts: 401
- Joined: Tue Jan 05, 2010 2:33 pm
Re: bitmaps trasparents
Is there something wrong with my Solution ??
( no problem, to add Wall-parts as well )
![Image](http://www.pflegeplus.com/pictures/plan1.jpg)
You can rearange everything.
![Image](http://www.pflegeplus.com/pictures/plan2.jpg)
Best Regards
Uwe![Laughing :lol:](./images/smilies/icon_lol.gif)
( no problem, to add Wall-parts as well )
![Image](http://www.pflegeplus.com/pictures/plan1.jpg)
You can rearange everything.
![Image](http://www.pflegeplus.com/pictures/plan2.jpg)
Best Regards
Uwe
![Laughing :lol:](./images/smilies/icon_lol.gif)
Last edited by ukoenig on Fri May 07, 2010 9:24 pm, edited 1 time in total.
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.
- MdaSolution
- Posts: 401
- Joined: Tue Jan 05, 2010 2:33 pm
Re: bitmaps trasparents
Where is the source CAn I try this ?
Then
the error is when you move a button with mouse with design value look my snapshot please
Then
the error is when you move a button with mouse with design value look my snapshot please
FWH .. BC582.. xharbour