On a related note
SetColor(surface,0,0,0,0);
FillRectangle(surface,x,y,w,h);
On a non Alpha surfaces in my case RGB16 seemed
to fill the surface with black instead of being a no-op like
I expected since the alpha should have resulted in the original color
remaining ?
Or am I just doing something stupid ?
Mike
On 10/16/05, Stefan Lucke <[EMAIL PROTECTED]> wrote:
> Hi,
>
> in softdevice I have some special code for clearing an YUY2 surface.
> It looks like Clear() does not works as expected (or did nothing).
>
> code with comment:
> videoSurface=dfb->CreateSurface(vidDsc);
> /*
> --------------------------------------------------------------------
> * Here is probably a bug in DirectFB, as Clear() does _not_ work
> * the same, as manual wipe out YUY2 surface. I tried Clear() on my
> * tests, but it did not solve the problem. That happens with my
> * Matrox G550.
> * videoSurface->Clear(0,0,0,0);
> * The workaround code assumes that in case of stretchBlit,
> pixelformat
> * YUY2 is used.
> */
> {
> int *dst, i, j;
> int pitch;
>
> videoSurface->Lock(DSLF_WRITE, (void **)&dst, &pitch);
> for(i = 0; i < vidDsc.height; ++i, dst += pitch/4)
> for (j = 0; j < vidDsc.width / 2; ++j)
> dst [j] = 0x80008000;
> videoSurface->Unlock();
> }
>
> --
> Stefan Lucke
>
>
> _______________________________________________
> directfb-dev mailing list
> [email protected]
> http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev
>
_______________________________________________
directfb-dev mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev