views:

1221

answers:

2

I'd like to display a smooth rounded rectangle on an ARM device running Windows CE 6.0.

I started with 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.

+1  A: 

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.

OregonGhost
Thanks for the recommendation, I'm having a look to see whether AmanithVG will run on my platform. Do I understand correctly that you've run OpenVG on a CE device with hardware support?
Daniel Weaver
BTW, did you mean CE or CF? I happen to be using Compact Framework, but I'm looking for any solution I can p/invoke.
Daniel Weaver
OpenVG is, like OpenGL, a procedural C API, but it's quite easy to P/Invoke. So I meant both CE and CF :) Unfortunately, I didn't get it to run on the device, because the current image I have does not have CF on it and I don't have PlatformBuilder. It runs fine on Linux on the same device though.
OregonGhost
I should get a new CE image in the next days to play with it via the Compact Framework. On Desktop, it runs fine from .NET.
OregonGhost
A: 

Windows Mobile 6 Professional includes a limited version of gdiplus.dll.

leppie
Thanks for the response. I think there are both technical and legal hurdles to using the gdiplus.dll from Windows Mobile on Windows CE. If you think it can be done, let me know.From my original question: http://community.opennetcf.com/articles/cf/archive/2007/10/31/using-gdi-on-windows-mobile.aspx
Daniel Weaver

related questions