Aah, I found a bug! The rectangle gets blended into the surface when I'm not using hardware acceleration. otherwise that part of the surface gets 100% transparent.
I'm using Matrox G550 and this is my code: surface->Blit(surface, surface2, NULL, &rect); surface->SetDrawingFlags(surface, DSDRAW_BLEND); surface->SetColor(surface, 100, 100, 100, 100); surface->FillRectangle(surface, rect.x, rect.y, rect.w, rect.h); If you don't have time to fix it, I might look into it, though it be nice to know if this only happens with G550. Hallvar Helleseth ([EMAIL PROTECTED]) * Denis Oliver Kropp ([EMAIL PROTECTED]) wrote: > Quoting Hallvar Helleseth ([EMAIL PROTECTED]): > > Hi! > > > > I've been trying to brightenup a surface containing an image. Is that > > possible? Sort of what I'm looking for is blitting a image to the > > surface and then drawing a semi-transparent white rectangle over it > > (blending the two together). It looks to me like that is difficult > > unless I use two windows, one with the image and another on top with the > > rectangle. > > > > Am I right or wrong? > > You can draw transparent rectangles, lines etc. by setting the > drawing flag DSDRAW_BLEND. The alpha factor used as the source > alpha value is the alpha value of the current color. The source alpha > value is used for the default source and destination blend functions. > > -- > Best regards, > Denis Oliver Kropp > > .------------------------------------------. > | DirectFB - Hardware accelerated graphics | > | http://www.directfb.org/ | > "------------------------------------------" > > Convergence GmbH -- Info: To unsubscribe send a mail to [EMAIL PROTECTED] with "unsubscribe directfb-users" as subject.
