如何在 Flex 4 中为文本添加笔画?具体来说,我想将它添加到标签中(文本将在其中更改)。
更新
建议的最接近的解决方案是添加阴影过滤器,如下所示。我添加了一个带有笔划的矩形进行比较。如果行程重量在 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>