|
List Info
Thread: Re: mouse cursor transparency?
|
|
| Re: mouse cursor transparency? |
  Austria |
2007-03-29 05:01:36 |
|
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: joy.karan gmail.com Gesendet: 2007-3-29 14:07:48 +0530 An: "Manfred Twrznik/maennerseminare. at" 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 < manfred.twrznik maennerseminare.at">manfred.twrznik maennerseminare.at> 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 directfb.org">directfb-users directfb.org http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users
-- JOY
|
| Re: mouse cursor transparency? |
  Germany |
2007-03-29 08:12:59 |
Manfred Twrznik/maennerseminare.at schrieb:
> 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...
A fix after 1.0.0 might help.
http://git.direc
tfb.org/?p=core/DirectFB.git;a=commit;h=3fcc94f1f0964fc19d5e
228ba4df8a67d1501090
--
Best regards,
Denis Oliver Kropp
.------------------------------------------.
| DirectFB - Hardware accelerated graphics |
| http://www.directfb.org/
|
"------------------------------------------"
_______________________________________________
directfb-users mailing list
directfb-users directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinf
o/directfb-users
|
|
[1-2]
|
|
|
about | contact Other archives ( Real Estate discussion Medical topics )
|