Windows CE 6.0中的抗锯齿圆角 [英] Anti-aliased rounded corners in Windows CE 6.0

查看:47
本文介绍了Windows CE 6.0中的抗锯齿圆角的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在运行Windows CE 6.0的ARM设备上显示一个平滑的圆角矩形.

我从 RoundRect ,但是结果有锯齿,因为Windows CE使用GDI和解决方案

我不知道CF支持如此糟糕.真的没有选择将GDI +放到系统上吗?我没有可用的Platform Builder,所以我不能自己看看.

我使用的解决方案是OpenVG.如果您的设备在硬件中支持它确实非常快(许多OpenGL ES 2.0设备似乎支持它),并且某些软件实现也应该足够快地运行(在台式机上,我正在使用RoundRect, but the result had jagged corners, since Windows CE uses GDI and doesn't support GDI+ as Windows Mobile 5+ does. My current provisional solution has been to create a lot of little corner bitmaps, but since the rest of the GUI design includes transparency, gradient fills, and variable width borders, this solution means creating and managing a large number of permutations of these bitmaps.

Is there any way to get GDI+-like graphics primitives in Windows CE? I have control of my Windows CE image, so I can build anything in as needed.

解决方案

I didn't know that the CF support for that is so bad. Is there really no option to put GDI+ onto the system? I don't have Platform Builder available, so I can't take a look for myself.

The solution I use is OpenVG. It is really fast if your device supports it in hardware (as many OpenGL ES 2.0 devices seem to), and there are software implementations that should work fast enough as well (on the Desktop, I'm using AmanithVG SRE for emulation). I didn't try AmanithVG SRE on my CE device though, and I think you have to contact them to get a binary (the Desktop binary is available from the website). If your device has a PowerVR chip (e.g. TI OMAP35x have one), PowerVR supplies the OpenVG hardware renderer (though you still need one for desktop).

OpenVG has an ugly API, like all of the OpenXX APIs (that is, if you're used to the .NET BCL), but they're ok and OpenVG was really easy to translate to .NET, because even though it's procedural, it is more or less object-oriented and they made all their constants into enums instead of defines.

这篇关于Windows CE 6.0中的抗锯齿圆角的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆