PDA

View Full Version : Problem using BitmapData.draw on UIComponents


cjuillard
07-29-2009, 11:26 PM
I've got a Flex application that displays a bunch of charts and I would like to generate a report with all the charts converted to images inside it. The difficulty is that I want the charts in the report to be slightly different than what I'm displaying in Flex.

To accomplish this I'm basically creating the chart in actionscript, forcing it to be added to the stage so Flex will initialize it, and then call the BitmapData.draw method to draw the chart to a bitmap. This seems to work fine for the charts but when I try to do the same with a Legend, the labels show but the colored boxes won't get drawn to the bitmap.

Anyone know why these wouldn't be getting drawn?