EDIT: see also Silvermoon – englisch post.

Es gibt einen super Post von Alex Feinmann (Opennet.cf) für einen GDI+ Wrapper am CompactFramework.

Unterstützt wird dabei nur Windows Mobile Professional – darum wird vermutlich auch von MS nichts derartiges geliefert.

Leider unterstützt diese Implementierung keine Rechtecke mit abgerundeten Ecken. Dazu habe ich aber etwas auf CodeProject von Arun Reginald gefunden.

Dann habe ich 3 kleine Methoden in die GraphicsPlus Klasse von Alex integriert – und angepasst und schon kann ich abegerundete Rechtecke am Windows Mobile zeichnen.

public GraphicsPath GetRoundedRectanglePath(float x, float y, float width, float height, float radius)
{
     GpRectF rectangle = new GpRectF(x, y, width, height);
     return GetRoundedRect(rectangle, radius);
} 


public
void DrawRoundRectangle(PenPlus pen,float x, float y,float width, float height, float radius)
{
   
GraphicsPath path = GetRoundedRectanglePath(x, y, width, height, radius);
   
DrawPath(pen, path);
}