简体   繁体   English

如何使用mvvcross / monodroid在位图中插入文本?

[英]How to insert text in bitmap with mvvcross/monodroid?

I'm would like to insert a string text in bitmap picture. 我想在位图图片中插入一个字符串文本。 I have to use mvvmcross/monodroid to create an application, so I can't use Graphics object or monodroid specific language (the code have to run on android/wp8/winRT...). 我必须使用mvvmcross / monodroid创建应用程序,因此不能使用Graphics对象或Monodroid特定语言(代码必须在android / wp8 / winRT上运行)。 Do you know any libraries that can help me ? 你知道有什么图书馆可以帮助我吗?

Manipulating graphics is not portable functionality - it's normally best to do this using platform specific code which often gets backing from hardware acceleration. 操纵图形不是可移植的功能-通常最好使用平台特定的代码来做到这一点,这些代码通常会得到硬件加速的支持。

I believe the correct way to handle this is to inject a specific implementation on each platform. 我相信处理此问题的正确方法是在每个平台上注入特定的实现。 I've done this myself on a customer project - but that's their IP - not open source code. 我已经在客户项目中亲自完成了此操作-但这就是他们的IP-并非开源代码。

One library that may help unify your code is CrossGraphics - https://github.com/praeclarum/CrossGraphics - but this is still native code on each platform. CrossGraphics- https ://github.com/praeclarum/CrossGraphics-一个可能有助于统一代码的库-但这仍然是每个平台上的本机代码。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM