1 Reply Latest reply on Dec 3, 2008 6:25 PM by Newsgroup_User

    capture background gradient with bitmapData.draw()

    baddcafe
      Hi all,
      So I have been charged with creating icons on the fly for various components of a RIA. The idea is that you can switch between views by selecting thumbnails of the views. I don't want to capture the entire stage for the iconification as that would include branding: mainly I just want to be able to pass in the relevant view component and build an icon from that.
      It's going pretty well: basically I just use bitmapData's draw method to render a component into a byte buffer which can then be manipulated for various thumbnailing needs. However, this only caputures the elements inside the component. Stuff behind it, like the background gradient, doesn't show up. This is a bit distracting so I would like to find a way around it. Any ideas about how to capture the background gradient using the draw() method? I'm not even sure how I would reference it as an object to pass in for the draw operation.
      Any help is appreciated.
      -Sam
        • 1. Re: capture background gradient with bitmapData.draw()
          Level 7

          "baddcafe" <webforumsuser@macromedia.com> wrote in message
          news:gh7bto$kd5$1@forums.macromedia.com...
          > Hi all,
          > So I have been charged with creating icons on the fly for various
          > components
          > of a RIA. The idea is that you can switch between views by selecting
          > thumbnails
          > of the views. I don't want to capture the entire stage for the
          > iconification as
          > that would include branding: mainly I just want to be able to pass in the
          > relevant view component and build an icon from that.
          > It's going pretty well: basically I just use bitmapData's draw method to
          > render a component into a byte buffer which can then be manipulated for
          > various
          > thumbnailing needs. However, this only caputures the elements inside the
          > component. Stuff behind it, like the background gradient, doesn't show up.
          > This
          > is a bit distracting so I would like to find a way around it. Any ideas
          > about
          > how to capture the background gradient using the draw() method? I'm not
          > even
          > sure how I would reference it as an object to pass in for the draw
          > operation.
          > Any help is appreciated.

          Have you tried using ImageSnapshot?