PDA

View Full Version : (un)DelphiX 1.0.8.4 DrawAlpha No Work!



freedelphi
04-04-2009, 08:38 AM
Yes It Is: http://www.micrel.cz/Dx/
Same DrawAlpha code (un)DelphiX1.0.8.2 is good.But (un)DelphiX1.0.8.4 DrawAlpha No Work!DrawAdd not work of FullScreen,but work good in Window model. :(

ijcro
05-04-2009, 06:39 PM
Please how use it?
Or send me snippet of code for test.
And version of your Delphi?

freedelphi
05-04-2009, 11:45 PM
The Code:
................
dsuf.DrawAdd(DestRect, SrcRect,ssuf,true, 255) ;{not work of FullScreen,but work good in Window model}
................
var
  d: TDirectDrawSurface;
  rc: TRect;,
...........
dsurface.DrawAlpha(rc,d.ClientRect, d, True, 200);//No Work
.....................
The Pic.bmp is 8 Bit 256 Color. Transparent color is clBlack 00000000
Thanks!

chronozphere
06-04-2009, 06:33 AM
I'm not a UnDelphiX expert but did you try enabling/disabling the Do3D and DoDirectX7 options in DXDraw > Options? It might be a good idea to play with the options a bit, and you might figure out how to make it all work. :)

User137
06-04-2009, 07:54 AM
{not work of FullScreen,but work good in Window model}

This made me think if you are using different pixelformat in fullscreen than your desktop is. Try setting it use 16, 24 or 32 bit colors in fullscreen and see if it effects.

Wizard
06-04-2009, 08:11 AM
Yes, Display should be 1024 x 768 x 16. The way I use DrawAdd and drawAlpha is as follows:


dxImageList.Items[26].DrawAdd(DXDrawGame.Surface, Bounds(30, 660, 296, 43),
0, Trunc(Cos256(FAngle)*126+127));


formGame.DXImageList.Items[formGame.fadingImageIndex].DrawAlpha(formGame.DXDrawGame.Surface,ImageRect,0 ,Alpha);

And do3d and doDirectX7 should be set to false.

Hope this helps ;D