![]() |
Re: [DelphiX] Zeichnen mit Transparenz
Hi ijcro,
could you give a quick explanation on how to get the alphachannel in the DIB? I tried it with Photoshop (new file -> background = transparent -> a few lines with the brush -> save as -> dib) but it just didnt save the alphachannel. Well maybe it did, but there was no transparence while drawing on the DXDraw surface. Is it possible to use the Sprite/ImageSprite classes just as before by changing the Image from a "foo.bmp" to a "foo.dib" or do you have to change something else? [edit] I just tried to load the image with this TDIB component and called
Delphi-Quellcode:
I saw the Alphachannel, so it must have been saved. But there is still no sign of the Alphachannel when I draw the picture as a Sprite..
DXDraw.Surface.LoadFromDIB(DIB.AlphaChannel);
[/edit] |
Re: [DelphiX] Zeichnen mit Transparenz
Helper exists and with it you can put DIB8 into alphachanel (or get out), please see into source in DIB units.
|
Re: [DelphiX] Zeichnen mit Transparenz
Do I have to Draw the DIB manualy or can I just go on drawing the ImageSprite with the DXSpriteEngine?
|
Re: [DelphiX] Zeichnen mit Transparenz
Aha, you is using DXSpriteEngine yet...
Whe you is using "new look" of DXSpriteEngine, you can use HW acceleration a picture with alpha channel, stored in DXImageList. When you prepare picture in other program in way joint DIB24 R8G8B8 and DIB8 A8 with function DIB32.AssignAlphaChannel(DIB8), no more. Please see to function HasAlphaChannel and property AlphaChannel in TDIB class too. |
Re: [DelphiX] Zeichnen mit Transparenz
Eh sorry, my English is worst than ever
:gruebel: |
Re: [DelphiX] Zeichnen mit Transparenz
Zitat:
|
Re: [DelphiX] Zeichnen mit Transparenz
Well, you can send there code for test...
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 10:12 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz