For the past few hours I have been trying to clone an image in Flex (using the Spark Components, but also trying to convert between Bitmap and BitmapImage).
What I am trying exactly is to create a simple painting application which keeps track of each Brush-Stroke. As soon as the Image on the Canvas has changed, it is to be cloned and then the clone is to be put into the History-Panel on the bottom of the application.
Things I have tried include:
- Using ObjectUtils.clone(Object)
- Creating BitmapData from Image.content, then making it a Bitmap and simply display it (Image doesn't have a content field, it says)
- Performing a byte-copy and others I could find on the internet, of course.
So basically, how does one clone an Image (Spark Image) in Flex 4.6?
Thank you very much!
-- Danny Nophut