要实现什么
我正在尝试对使用 BorderContainer (SPARK) 从 URL 检索到的图像应用圆 Angular 。
问题
BorderContainer 组件的 Radius 属性仅在从我的调试器运行代码时应用,在其他地方运行它根本不会将半径应用于位图图像。
代码示例
<s:BitmapImage id="img" width="60" height="60" source="{data.IconURL}" smooth="true" smoothingQuality="high">
<s:mask>
<s:BorderContainer id="bmpMask" cornerRadius="15" width="60" height="60" borderVisible="true" />
</s:mask>
</s:BitmapImage>
最佳答案
完整的工作示例:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
<s:BitmapImage source="https://www.dropbox.com/s/j5wu759l1tkiw2b/archer.jpg?dl=1"
height="100" width="100" maskType="alpha">
<s:mask>
<s:BorderContainer id="bmpMask" cornerRadius="15" width="60" height="60"
borderVisible="true"/>
</s:mask>
</s:BitmapImage>
</s:Application>
关于css - Apache Flex 4.14.1 BorderContainer Radius 仅适用于 Debugger,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33230969/