简体   繁体   English

将SVG图形加载到FireMonkey应用程序需要做什么?

[英]What road to take to load an SVG graphic into a FireMonkey app?

There are about four implementations I can think of that are capable of loading SVG graphics into a Delphi application. 我能想到的有四种实现能够将SVG图形加载到Delphi应用程序中。

One of those, by Mattias Andersson, who is the author of FMX.Canvas.VPR , works with FireMonkey, but he's not yet prepared to release the code. 其中一个由Mattias Andersson(他是FMX.Canvas.VPR的作者)与FireMonkey合作,但他还没有准备好发布代码。

A second one, by Martin Walter , works with the VCL, but developer has quit Delphi and has no plans to convert to FireMonkey. 第二个是由Martin Walter与VCL合作,但是开发人员退出Delphi并且没有计划转换为FireMonkey。

A third one, part of the AGGPAS framework, works with the VCL, but no FireMonkey. 第三个是AGGPAS框架的一部分,与VCL一起工作,但没有FireMonkey。

A fourth one is in development by Jason Southwell, but no date has been fixed yet. Jason Southwell正在开发第四个,但尚未确定日期。

So my question: what road to take if I want an SVG component today, without trying to reinvent the wheel a fifth (and probably more) time? 所以我的问题是:如果我今天想要一个SVG组件,而不试图重新发明第五个(可能更多)的时间,那么我们要走哪条路?

I'm Mattias Andersson -- the author of FMX.Canvas.VPR; 我是Mattias Andersson - FMX.Canvas.VPR的作者; I can say that I'm still actively working on the SVG solution. 我可以说我还在积极研究SVG解决方案。 I guess once I have properly added support for gradients and text rendering then I can release a first beta version. 我想一旦我正确添加了对渐变和文本渲染的支持,那么我就可以发布第一个beta版本。 I'm relying on TXMLDocument and that is a bit restrictive in what you are permitted to do (IMO), so I've had to invent some workarounds (maybe a better option would have been to implement my own XML class from scratch.) Also, I've had to do some run-time patching of the FireMonkey classes in order to make everything work correctly. 我依赖于TXMLDocument,这对你被允许做的事情(IMO)有点限制,所以我不得不发明一些解决方法(也许更好的选择是从头开始实现我自己的XML类。)此外,我必须对FireMonkey类进行一些运行时修补,以使一切正常工作。 The good part is that I'm actually implementing things according to the SVG interface specifications. 好的部分是我实际上是根据SVG接口规范实现的。

Getting involved with Mattias Andersson in the development is the best option: 参与Mattias Andersson的开发是最好的选择:

  • FMX.Canvas.VPR by Mattias Andersson looks promising and VPR is proven to be an excellent project Mattias Andersson的FMX.Canvas.VPR看起来很有前途,VPR被证明是一个很好的项目
  • No spoon-fed SVG FireMonkey component working out-of-the-box is available as of the time of posting (extensive web search made in general). 截至发布时(广泛的网络搜索),没有SVG FireMonkey勺子式SVG FireMonkey组件。

The SVG component I've been working on has been released as part of our Apesuite for Firemonkey. 我一直在研究的S​​VG组件已作为我们的Apesuite for Firemonkey的一部分发布。

http://arcana.sivv.com/apesuite http://arcana.sivv.com/apesuite

You could also consider using Chromiumembedded . 您也可以考虑使用Chromiumembedded Just load the svg in the embedded browser. 只需在嵌入式浏览器中加载svg即可。 You can then mix Delphi code with javascript, mix in html and css, etc. 然后你可以将Delphi代码与javascript混合,混合使用html和css等。

This way, you can just leave it up to Chrome how to draw stuff fast (for example whether to employ gpu acceleration or not). 通过这种方式,您可以将它留给Chrome如何快速绘制内容(例如是否使用gpu加速)。

You'll get proper svg support, it's easy to integrate into your application, it's flexible, and there is lots of documentation and example code available online. 您将获得正确的svg支持,它易于集成到您的应用程序中,它非常灵活,并且有大量文档和示例代码可在线获得。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 将文本文件加载到Delphi XE-5 Firemonkey Android App中的字符串列表中 - Load text file into stringlist in Delphi XE-5 Firemonkey Android App 如何从Firemonkey中的文件加载自定义光标以在Mac应用程序上使用? - How to load a custom cursor from file in Firemonkey to be used on a Mac app? 为 firemonkey 移动应用程序定义代码页的目的是什么? - What the purpose of defining a code page for a firemonkey Mobile app? 在 Firemonkey 移动应用程序中保存对象本地数据的最佳方法是什么? - What is the best method to save Objects local data in Firemonkey mobile app? 找不到适用于firemonkey应用程序的资源 - Resource Not Found for firemonkey app 如何制作带有透明图形的firemonkey按钮并将其设置为默认样式 - How make a firemonkey button with transparent graphic, and make it the default style 如何在Firemonkey中加载自定义光标? - How to load custom cursor in Firemonkey? 在运行时创建大量控件以最小化firemonkey的加载时间的最佳方法是什么? - What is the best way to create a lot of controls at runtime to minimize the load time in firemonkey? 如何使用FireMonkey(多平台)截取屏幕截图 - How to take a screenshot with FireMonkey (multi-platforms) OS X Firemonkey应用程序中的TClientDataset - TClientDataset in OS X Firemonkey App
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM