thanks for your answer, your code helps, but does not fix the problem 
completely. The black rectangle is now dark blue (like parts of the background) 
and almost transparent, but it is still visible... 

regards, m_tw  

-----Ursprüngliche Nachricht-----
Von: [EMAIL PROTECTED]
Gesendet: 2007-3-29 14:07:48 +0530
An: "Manfred Twrznik/maennerseminare. at" 
Betreff: Re: [directfb-users] mouse cursor transparency?try this code

desc_t.flags = DSDESC_WIDTH | DSDESC_HEIGHT | DSDESC_PIXELFORMAT;
desc_t.width = 20; desc_t.height = 20;
desc_t.pixelformat = DSPF_ARGB;

DFBCHECK(dfb->CreateSurface(dfb, &desc_t, &cursor_surface)); 

DFBCHECK(cursor_surface->SetBlittingFlags(cursor_surface,DSBLIT_BLEND_ALPHACHANNEL));
DFBCHECK(cursor_surface->SetPorterDuff(cursor_surface,DSPD_SRC_OVER));
DFBCHECK (dfb->CreateImageProvider (dfb, cursor, &provider)); // here cursor IS 
PATH for ur gif image 
DFBCHECK (provider->GetSurfaceDescription (provider, &desc_t));
DFBCHECK (provider->RenderTo (provider, cursor_surface, NULL));
provider->Release (provider);
DFBCHECK(dfbLayers->SetCursorShape(dfbLayers, cursor_surface,0 ,0)); 

DFBCHECK (cursor_surface->SetBlittingFlags(cursor_surface,DSBLIT_NOFX));
DFBCHECK (cursor_surface->SetPorterDuff(cursor_surface,DSPD_NONE ));

On 3/29/07, Manfred Twrznik/maennerseminare. at <[EMAIL PROTECTED]> wrote:  

Hi,
I 'm trying to get a colorkeyed mouse cursor, but regardless what I try, it 
does not work.  

I use a layer, a full-screen window and a window-surface. For the mousecursor I 
use a gif-file, which is a white arrow in a black rectangle and has the color 
black marked as transparent. If I blit the picture somewhere at the 
window-surface, only the non-black part, e.g. the arrow of the gif is blitted. 
But if I use the same surface as a mousecursor, I have the whole gif (black 
rectangle and white arrow) as cursor. 

Thanks in advance for your help!
M_Tw

_______________________________________________
directfb-users mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users 

-- 
JOY 
_______________________________________________
directfb-users mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users

Reply via email to