Re: [flexcoders] How does one implement IBitmapDrawable
On Tue, Jun 2, 2009 at 7:52 AM, Stephen More stephen.m...@gmail.com wrote: The docs do not say much about IBitmapDrawable: http://livedocs.adobe.com/flex/3/langref/flash/display/IBitmapDrawable.html In your example lets say I create: MyUIComponet extends UIComponet What method do I need to write in MyUIComponet such that I can respond back with an embeded image instead of the rendering of the children of UIComponet when IBitmapDrawable is called ? IBitmapDrawable is a marker interface. It doesn't actually have any methods that you can implement. Basically BitmapData.draw() will just capture the object as it would appear on the screen. I don't believe that the IBitmapDrawable object gets any sort of notification when it is being drawn. You can of course notify it yourself so it can redraw itself a different way before calling BitmapData.draw(). Manish
[flexcoders] How does one implement IBitmapDrawable
Given this code: var bitmapData:BitmapData; bitmapData.draw( IBitmapDrawable( target ) ); What method(s) does target need to implement so that bitmapData will have valid data in it ? Can anyone provide an example ? -Thanks
Re: [flexcoders] How does one implement IBitmapDrawable
IBitmapDrawable is implementd by flash.display.DisplayObject... of which Flex mx.core.UIComponet extends. So... If you want to create something that you can groggle BitmapData with that¹s a pretty good place to start. http://livedocs.adobe.com/flex/3/langref/mx/core/UIComponent.html Cheers, Rick Winscot On 6/1/09 4:39 PM, Stephen More stephen.m...@gmail.com wrote: Given this code: var bitmapData:BitmapData; bitmapData.draw( IBitmapDrawable( target ) ); What method(s) does target need to implement so that bitmapData will have valid data in it ? Can anyone provide an example ? -Thanks
Re: [flexcoders] How does one implement IBitmapDrawable
The docs do not say much about IBitmapDrawable: http://livedocs.adobe.com/flex/3/langref/flash/display/IBitmapDrawable.html In your example lets say I create: MyUIComponet extends UIComponet What method do I need to write in MyUIComponet such that I can respond back with an embeded image instead of the rendering of the children of UIComponet when IBitmapDrawable is called ? On Mon, Jun 1, 2009 at 6:08 PM, Rick Winscot wrote: IBitmapDrawable is implementd by flash.display.DisplayObject... of which Flex mx.core.UIComponet extends. So... If you want to create something that you can groggle BitmapData with – that’s a pretty good place to start. http://livedocs.adobe.com/flex/3/langref/mx/core/UIComponent.html Cheers, Rick Winscot On 6/1/09 4:39 PM, Stephen More wrote: Given this code: var bitmapData:BitmapData; bitmapData.draw( IBitmapDrawable( target ) ); What method(s) does target need to implement so that bitmapData will have valid data in it ? Can anyone provide an example ? -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:flexcoders-dig...@yahoogroups.com mailto:flexcoders-fullfeatu...@yahoogroups.com * To unsubscribe from this group, send an email to: flexcoders-unsubscr...@yahoogroups.com * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/