On Thu, Nov 17, 2005 at 04:13:14PM -0800, Steve Longerbeam wrote:
> I have written a very simple little program to test the global opacity 
> capability of my custom gfxdriver for the PXA27x.
> 
> I am trying to set a background image into a base layer, and then blit 
> another image to another overlay that supports global opacity. I need to 
> see that the background image shows through the foreground image, of 
> varying amounts controlled by layer->SetOpacity().
> 
> Attached is the simple program to test this. If I comment out the call 
> to setup_fg_image(), I can see the background image, and if I comment 
> out the call to setup_bg_image(), I can see the foreground image. But 
> not both at the same time, it seems blitting the foreground image always 
> erases the background image first. Which makes me think that when I 
> ->Blit and ->Flip the foreground surface, the surface is actually 
> getting sent to the backround layer, not the foreground layer.
> 
> So I don't really understand how to associate a Surface with a 
> DisplayLayer. I am using layer->GetSurface() and I assume that is one 
> way to make the surface <--> layer association, or am I wrong?

The association is always there. Each layer has one surface and you can 
get an interface to it with GetSurface().

Your code looks basically ok to me. The first thing to check is that you 
actually use two layers and not just one. You already print the layer 
names in the enum callback so checking that is simple. The next thing 
to check is the return values of SetOpacity() and SetScreenRectangle().

-- 
Ville Syrjälä
[EMAIL PROTECTED]
http://www.sci.fi/~syrjala/

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

Reply via email to