List Info

Thread: how to blit a surface (no alpha) to ARGB, while the alpha data of ARGB surface keep untouched




how to blit a surface (no alpha) to ARGB, while the alpha data of ARGB surface keep untouched
user name
2006-06-22 12:09:31
Jiao wrote:
> all:
>   I want to blit a RGB24 surface to an ARGB surface.for
example  pixel RGB(128,128,128)+ARGB(100,0,0,0) --->
ARGB(100,128,128,128). is there a way to implement it or I
have some misunderstanding

The following should work:

argb_surface->SetBlittingFlags( DSBLIT_BLEND_ALPHACHANNEL
);
argb_surface->SetSrcBlendFunction( DSBF_ONE );
argb_surface->SetDstBlendFunction( DSBF_ONE );
argb_surface->Blit( rgb24_surface, ... );


-- 
Regards,
      Claudio Ciccani

klanusers.sf.net
http://directfb.org
http://sf.net/pro
jects/php-directfb

_______________________________________________
directfb-dev mailing list
directfb-devdirectfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/
directfb-dev
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )