1.2*_*tts 1 apache-flex flash actionscript-3 fxg
如何在Flex 4中为文本添加笔划?具体来说,我想将它添加到Label(文本将在其中更改).
更新
建议的最接近的解决方案是添加阴影滤镜,如下所示.我添加了一个带有笔划的矩形进行比较.如果行程重量在2到3之间,则可以接受.如果它高于或低于那么它太模糊或粗糙.在我的情况下,我需要支持2至6重量.
后续问题是可以通过Pixel Bender创建笔画滤镜.
<s:VGroup>
<s:Label text="Select an example on the left. Right-click to view source."
color="#FF8C00"
top="10" left="10"
fontSize="25">
<s:filters>
<s:DropShadowFilter blurX="2" blurY="2" distance="0" quality="1" strength="10" color="#000000"/>
</s:filters>
</s:Label>
<s:Rect width="100%" radiusX="8" radiusY="8"
height="18">
<s:fill>
<s:SolidColor color="#FF8C00"/>
</s:fill>
<s:stroke>
<s:SolidColorStroke weight="1" />
</s:stroke>
</s:Rect>
<s:Label text="Select an example on the left. Right-click to view source."
color="#FF8C00"
top="10" left="10"
fontSize="25">
<s:filters>
<s:DropShadowFilter blurX="4" blurY="4" distance="0" quality="1" strength="10" color="#000000"/>
</s:filters>
</s:Label>
<s:Rect width="100%" radiusX="8" radiusY="8"
height="18">
<s:fill>
<s:SolidColor color="#FF8C00"/>
</s:fill>
<s:stroke>
<s:SolidColorStroke weight="2" />
</s:stroke>
</s:Rect>
<s:Label text="Select an example on the left. Right-click to view source."
color="#FF8C00"
top="10" left="10"
fontSize="25">
<s:filters>
<s:DropShadowFilter blurX="6" blurY="6" distance="0" quality="1" strength="10" color="#000000"/>
</s:filters>
</s:Label>
<s:Rect width="100%" radiusX="8" radiusY="8"
height="18">
<s:fill>
<s:SolidColor color="#FF8C00"/>
</s:fill>
<s:stroke>
<s:SolidColorStroke weight="3" />
</s:stroke>
</s:Rect>
<s:Label text="Select an example on the left. Right-click to view source."
color="#FF8C00"
top="10" left="10"
fontSize="25">
<s:filters>
<s:DropShadowFilter blurX="8" blurY="8" distance="0" quality="1" strength="10" color="#000000"/>
</s:filters>
</s:Label>
<s:Rect width="100%" radiusX="8" radiusY="8"
height="18">
<s:fill>
<s:SolidColor color="#FF8C00"/>
</s:fill>
<s:stroke>
<s:SolidColorStroke weight="4" />
</s:stroke>
</s:Rect>
</s:VGroup>
Run Code Online (Sandbox Code Playgroud)
只有我知道如何应用真正的,非常强大GlowFilter的模糊半径.
就像是:
var stroke:GlowFilter = new GlowFilter(0x000000, 1, 2, 2, 10, 1);
field.filters = [stroke];
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3541 次 |
| 最近记录: |