PDA

View Full Version : UnDelphiX and transparent colors



Rojekti
05-03-2007, 06:59 AM
Sorry for making these..


When I draw pictures from UnDelphiX's imagelist- component, I usually use normal draw(surface,x,y,patternI)- method, but sometimes I need the others, for example DrawSub, or DrawAlpha, etc. and when I use them, the transparent colors won't work. They DO work with normal Draw- method.

What solves this problem?

ijcro
06-03-2007, 07:50 AM
Do you use HW acceleration or not?

Rojekti
07-03-2007, 07:52 AM
Do you use HW acceleration or not?

Yes, I use it.

Haven't got solved the problem, causes me headache.

ijcro
07-03-2007, 11:25 PM
Can I see your code and sample of picture?

Rojekti
08-03-2007, 01:34 PM
In deep inside, the code is simple; I'm just using the DrawAlpha- method.


TPictureList loads it's items in the beginning from graph folder and takes the transparent color from picture's pixels [0,0], like usually. And images' backgrounds are totally the right and solid color, checked in many ways. So this SHOULd work, everything's ok.

Is there something I dont know? With normal Draw or StretchDraw etc. those works well but DrawAlpha-, DrawSub- and DrawAdd- methods screws it up.. :(

seiferalmasy
08-03-2007, 04:58 PM
you gonna have to supply small demo;)

ijcro
08-03-2007, 07:27 PM
It is very funny, but it is true

Rojekti
26-03-2007, 01:54 PM
Umm. Yea. I got it working, just changed all the backgrounds of images (BMP) into black and it worked, mm, for a while, yesterday it again started to fail.. and FPS dropped and thousands of other problems came up, also some weird errors appeared in DXInput.pas etc., didn't help to reinstall it, also booted whole computer but nothing works. Caused me a headache.

I just arrived home and tried to solve the problem but nothing seems to help, and, accidentally, I found some web-site about Asphyre and got excited of it, now I'll try to change DelphiX -> Asphyre. It made quite an impression :)


Long live DelphiX! It served me all the way here.

Pensive
03-04-2009, 06:48 PM
Eureka!!! Thanks....your little fix of using a black trans colour fixed my problem in the following thread!

http://www.pascalgamedevelopment.com/forum/index.php?topic=5691.new;topicseen#new

User137
03-04-2009, 07:10 PM
Bumping old threads is bad...

DelphiX doesn't use TColor as transparent color, therefore clGreen or other will not work. However clBlack equals to 0 which will work. There are functions in for example TDirectDrawSurface to find out DelphiX color from TColor.