Hi,
I am playing a video using native call(Not directfb). I created a primary surface.and draw a image. When i clearing the image using FillRectangle i am getting a black patch. I want to clear using transparency means on clear i should able to see video rather than black patch. How can i achieve this? Here is code snippet:- /* Creating primary surface */ dsc.flags = DSDESC_CAPS | DSDESC_PIXELFORMAT; dsc.pixelformat = DSPF_ARGB; dsc.caps = DSCAPS_PRIMARY | DSCAPS_FLIPPING; DFBCHECK (dfb->CreateSurface( dfb, &dsc, &pFrameBuffer )); /* Drawing Image */ dfb->CreateImageProvider(dfb, img, &provider); provider->GetSurfaceDescription(provider, &sDesc); sDesc.flags = DSDESC_PIXELFORMAT | DSDESC_WIDTH | DSDESC_HEIGHT; sDesc.width = 200; sDesc.height = 200; sDesc.pixelformat = DSPF_ARGB; dfb->CreateSurface(dfb, &sDesc,&imgSurface); imgSurface->Clear(imgSurface, 0x00, 0x00, 0x00, 0xFF); provider->RenderTo(provider, imgSurface, NULL); provider->Release(provider); pFrameBuffer->SetBlittingFlags(pFrameBuffer,DSBLIT_BLEND_ALPHACHANNEL); pFrameBuffer->SetPorterDuff(pFrameBuffer,DSPD_SRC_OVER); pFrameBuffer->Blit(pFrameBuffer, imgSurface, NULL, 200, 200); pFrameBuffer->SetBlittingFlags(pFrameBuffer,DSBLIT_NOFX); pFrameBuffer->SetPorterDuff(pFrameBuffer , DSPD_NONE); DFBCHECK(pFrameBuffer->Flip(pFrameBuffer, NULL, DSFLIP_WAITFORSYNC)); DFBCHECK(pFrameBuffer->Flip(pFrameBuffer, NULL, 0)); /* Clear screen */ //pFrameBuffer->SetDrawingFlags(pFrameBuffer, DSDRAW_BLEND); //I tried this also but success //pFrameBuffer->SetPorterDuff(pFrameBuffer,DSPD_SRC_OVER); DFBCHECK(pFrameBuffer->SetColor(pFrameBuffer,0xFF,0x00,0x00,0xFF)); DFBCHECK(pFrameBuffer->FillRectangle(pFrameBuffer, 200, 200, 200, 200)); DFBCHECK(pFrameBuffer->Flip(pFrameBuffer, NULL, DSFLIP_WAITFORSYNC)); DFBCHECK(pFrameBuffer->Flip(pFrameBuffer, NULL, 0)); -- JOY Never expect things to happen.. struggle and make them happen. never expect yourself to be given a good value create a value of your own
_______________________________________________ directfb-users mailing list directfb-users@directfb.org http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users