Thanks for the info, Good to know it's a known feature.  I've come
across this previously but this is the first time I've asked about the
fading issue.  

I think I can work around it for the moment and will check out the svn
version when I get a chance.  

Justin 

-----Original Message-----
From: Ulrich von Zadow [mailto:[email protected]] 
Sent: Friday, 25 June 2010 5:19 PM
To: [email protected]
Subject: Re: [libavg-users] fading divs

Hi Justin,

yep, that happens. There are workarounds, but the basic behaviour is not
likely to change :-(.

It's a consequence of how things are rendered: Each element in a div is
rendered in turn with an opacity that is calculated from it's parent's
opacitites. To fix it in the general case, we would have to render each
div to it's own offscreen buffer and then render that buffer to the
screen with the div's opacity. That would kill performance.

But: in cases where it matters, you can render to an offscreen buffer
explicitly. This only works with the svn version of libavg, since it's a
relatively new feature. Have a look here:
https://www.libavg.de/wiki/index.php/Offscreen_Rendering

Cheers,

  Uli

On Jun 25, 2010, at 3:21 AM, Justin Maynard wrote:

> When I fade out a div node that has several elements. eg a background
and several buttons.  It does not fade out as I would expect it to. As
the background fades out the elements that overlay them briefly become
brighter before fading out themselves. My overlaid elements are PNG's
with an alpha layer.  I've had a play around with blend modes but didn't
solve anything.
>  
> Libavg 1.0.1 on a mac book pro.
>  
> <div id="Page2" x="0" y="0" width="1920" height="1200" active="0">
> <image id="catalogue_Page2" x="0" y="0" href="images/catalogue_2.png"
/>
>             <image id="P2_Next_P3" x="1726" y="893"
href="images/next.png" oncursorup="touchButton" />
>             <image id="P2_Home_P1" x="1726" y="1029"
href="images/home.png" oncursorup="touchButton" />
>             <image id="P2_Circle_P4" x="128" y="487"
href="images/circle.png" oncursorup="touchButton" />
> </div>
>  
> The elements have been cut from a template so while they have a
transparency that also have a some colored pixels on the edge aliased to
the background.  They are only noticeable when you fade out the div. 
>  
> Regards
>  
> Justin
> _______________________________________________
> libavg-users mailing list
> [email protected]
> https://mail.datenhain.de/mailman/listinfo/libavg-users

--
Any technology distinguishable from magic is insufficiently advanced.

Ulrich von Zadow | +49-172-7872715
Jabber: [email protected]
Skype: uzadow




_______________________________________________
libavg-users mailing list
[email protected]
https://mail.datenhain.de/mailman/listinfo/libavg-users

_______________________________________________
libavg-users mailing list
[email protected]
https://mail.datenhain.de/mailman/listinfo/libavg-users

Reply via email to