Transparencies

Epo
02-25-2002, 02:51 PM
Dim CKey As DDCOLORKEY

Private Sub DrawPic()
'Drawing a person
Dim PersonRect As RECT
PersonRect.Top = CTop
PersonRect.Left = CLeft
PersonRect.Bottom = CBottom
PersonRect.Right = CRight

CKey.low = vbBlack
CKey.high = vbBlack
Character.SetColorKey DDCKEY_SRCBLT, CKey

Call BackBuffer.BltFast(XLeft, YDown, Character, PersonRect, DDBLT_KEYSRC Or DDBLTFAST_WAIT)

'Flip it
Primary.Flip Nothing, DDFLIP_WAIT
End Sub


I'm trying to set the black color on my picture to be transparent, but if i use the code (specifically when i add "DDBLT_KEYSRC" to the Call Backbuffer.BltFast line) then not only does the black become transparent, but the entire surface does (the picture disappears)

Any comments, ideas, glad to hear :)

Thanks

AcidBoot
06-29-2002, 05:11 AM
Try replacing DDCKEY_SRCBLT with DDBLTFAST_SRCCOLORKEY

A bit silly, but BltFast uses different arguments.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum