Factum Vicesimus Quartus

Exploring web x.0, innovation and RIA techniques

Add to Netvibes    Add to Google




ReflectionManager v0.9

April 26th, 2007


<– I have updated the Reflection Manager. The new version can be found overhere –>

Last week I needed a reflection at the bottom of the application I was working on. After searching the internet for a while I found some reflection classes on my favorite Flex resource, Flexbox. But after testing 2 of these I saw that the smoothness and speed of my application was decreasing drastically. So I took some time to figure out the structure of the reflection and came up with some ideas on improvements that I could built in. I wrote a new Reflection Manager, which I think is a little more efficient in some ways. I separated the bitmapdata for the alpha gradient and the component copy so that I can update them separately and then combine them into 1 bitmapdata by using the copyPixels method. I did this so it only draws the alpha gradient bitmapdata once and only updates the component data when the Flex UpdateEvent occurs. When the component or the reflection is resized, it also updates the alpha gradient data. This saves quite some CPU power.

ReflectionManager v0.9

The height of the bitmapdata is equal to the height given by the user for the reflection and not the entire height of the component your reflecting. Less pixels are drawn this way which you don’t see after all. There are still some improvements to be made but it’s a good start I think. Check it out!

Open the Reflection Explorer.
View source.

Let me know what you think, suggestions on how to improve the Reflection Manager are welcome as always.

Popularity: 13% [?]


9 Responses to "ReflectionManager v0.9"
  1. # 1   Ruben
    April 26th, 2007 at 11:12

    Nice job man, keep it up!

  2. # 2   Mrinal Wadhwa
    April 26th, 2007 at 12:12

    Wow this is very nice!

    I tried it out with something that I’m building at work and there’s a noticeable performance improvement … good job!!

    Now if you could just add blur like Jason’s reflection component .. It’ll be perfect.

    http://blog.wrench.com.au/2006/07/08/live-reflection-component-with-a-twist/

  3. # 3   Niels Bruin
    April 26th, 2007 at 14:24

    Great work Wietse, works perfect!

  4. # 4   Wietse Veenstra
    April 26th, 2007 at 17:06

    Thanks for the comments guys!:) Appreciate it! I will certainly keep improving this class and i’ll check out the blur a.s.a.p. Mrinal. How far are you with the Flexbox updates b.t.w.?

  5. # 5   Jaap Kooiker
    April 26th, 2007 at 19:34

    Great approach and improvement! keep it up!

  6. May 3rd, 2007 at 14:43

    [...] A manager for your web 2.0 type reflections (link) [...]

  7. May 29th, 2007 at 19:31

    [...] have implemented a blurring option like suggested in the comments on my previously posted version (0.9). I have also built in the functionality to update the reflection when its target component is [...]

  8. # 8   dzinr38
    October 30th, 2007 at 14:29

    I was wondering if there are any licenses or restrictions in using the reflectionManager? Is this free to use with no gpl restrictions? Thanks!

  9. # 9   Vik
    January 4th, 2010 at 19:40

    That’s very nice, my friend!

Leave a Reply