我想在iOS应用程序中以Adobe FXG文件格式(从Flash导出)或SVG格式显示图像.是否有可以渲染矢量图形的Objective-C工具或库?
(我不想将我的图像转换为位图格式!我想保留矢量格式)
我见过的唯一一个FXG编辑器是7jigen,在线工作或作为Flex应用程序.
有谁知道不同的?我认为它可以在Illustrator中完成,但这并不能真正提供简单的导出到Flex类型选项,只需提供坐标.
我正在阅读一些XML数据(如果您熟悉它们,则为FXG文件).
部分数据具有不同的标签名称:
<varying_name1 scaleX="1.0046692" x="177.4" y="74.2"/>
<varying_name2 scaleX="1.0031128" x="171.9" y="118.9"/>
Run Code Online (Sandbox Code Playgroud)
我创建了一个名为Transforms的类来表示变量标记名称段中的数据.在我的JAXB类中保存我拥有的数据:
@XmlAnyElement(lax=true)
@XmlJavaTypeAdapter(TransformAdapter.class)
protected List<Transform> transforms;
Run Code Online (Sandbox Code Playgroud)
在我的适配器中,我尝试解组数据:
JAXBContext context = JAXBContext.newInstance(Transform.class);
Unmarshaller unmarshaller = context.createUnmarshaller();
Transform result = (Transform) unmarshaller.unmarshal(v);
Run Code Online (Sandbox Code Playgroud)
但是,我的代码在这里引发异常,因为我的元素上的根名称不同.这不是一个常数.我明白了:
unexpected element (uri:"http://ns.adobe.com/fxg/2008", local:"m6_mc"). Expected elements are (none)
Run Code Online (Sandbox Code Playgroud)
如何解析我的数据,就好像根元素具有预期的名称一样?
如何在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"/> …
Run Code Online (Sandbox Code Playgroud)