简体   繁体   English

生成Flex BitmapData的源信息

[英]Generating Source Info For Flex BitmapData

Instead of populating the BitmapData class from an IMAGE. 而不是从IMAGE中填充BitmapData类。 I would like to (within Actionscript) GENERATE some new BitmapData by capturing the Bitmap representing say, a TextArea component on the stage. 我想(在Actionscript中)通过捕获表示舞台上的TextArea组件的Bitmap来生成一些新的BitmapData。

In other words, sort of take a "screen capture" or "screenshot" of one of the components, and convert that into an image. 换句话说,需要对其中一个组件进行“截屏”或“截屏”,然后将其转换为图像。 Am I silly to even wonder if such a thing is feasible? 我很傻,甚至想知道这样的事情是否可行吗? Can an Air/Flex app "look at itself" in this way? Air / Flex应用程序可以通过这种方式“自我观察”吗? Can it turn a datagrid or a canvas or a textinput into the corresponding image AS IF via screen capture? 它可以通过屏幕捕获将数据网格,画布或文本输入转换为相应的图像AS IF吗?

Even a hint in the right direction would be appreciated, 甚至在正确方向上的提示也将不胜感激,

Thanks In Advance. 提前致谢。

http://blog.flexexamples.com/2007/12/07/using-the-imagesnapshot-class-to-capture-images-as-jpegs-or-pngs-in-flex-3/ http://blog.flexexamples.com/2007/12/07/using-the-imagesnapshot-class-to-capture-images-as-jpegs-or-pngs-in-flex-3/

If you want to take the screenshot of particular component, then you need to use the BitMapData class and calculate pixel by pixel by drawing it. 如果要获取特定组件的屏幕快照,则需要使用BitMapData类并通过绘制逐像素计算。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM