在缩放的 Flex 应用程序中平滑鼠标悬停图像?
我有一个弹性应用程序,我正在使用 systemManager.stage.scaleMode=StageScaleMode.NO_BORDER 进行缩放;在大多数情况下,除了我的位图数据(主要是来自设计师的 png)之外,它运行良好。
我可以将 mx:image 标签设置为 smoothBitmapContent=true,这对于除鼠标悬停对象之外的所有内容都非常有效。当我将鼠标悬停时,源将从一个嵌入图像更改为另一嵌入图像。我已经尝试了几个(很多)在线“smoothimage”类,并尝试编写自己的类,我尝试每次有机会重置 smoothBitmapContent 但仍然没有骰子。似乎因为我在应用程序级别进行缩放,所以翻出的位图在渲染时没有得到平滑。
如何让事情保持顺利?也许有一个标志告诉 Flex 在缩放时平滑内容?
I have a flex app I am scaling using systemManager.stage.scaleMode=StageScaleMode.NO_BORDER; for the most part it works well except for my bitmap data (mostly png's from the designers).
I can set the mx:image tags to smoothBitmapContent=true and that works great for everything except my mouseover objects. When I do a mouseover, the source is being changed from one embedded image to another embedded image. I have tried several (many) online "smoothimage" classes, and tried to write my own, I have tried to reset smoothBitmapContent every chance I get but still no dice. It seems to mee that because I am scaling at the app level, that the flopped out bitmap is not getting smoothed when it renders.
How to keep things smooth? Perhaps there is a flag to tell Flex to smooth stuff when it scales it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
因此,简单的答案(对我有用)不是将 image.source 从一个嵌入的 png 更改为另一个,而是使用两个图像并在两个图像之间翻转 image.visible...当然,这会添加两个额外的对象但由于某种原因,它们都保持平滑和缩放的方式,而与以前一样,切换源会从平滑变为锯齿状且难以阅读。
乔什
So the easy answer (that works for me) was to instead of changing the image.source from one embedded png to another, was to use two images and flip flop image.visible between the two... Granted that adds two extra objects to the screen, But for some reason they all stay smoothed and scaled that way, where as before switching sources was going from smooth to jaggidy and un-readable.
Josh