]> granicus.if.org Git - graphviz/commitdiff
apply patch from dds@aueb.gr
authorJohn Ellson <ellson@research.att.com>
Mon, 16 Apr 2012 16:34:31 +0000 (12:34 -0400)
committerJohn Ellson <ellson@research.att.com>
Mon, 16 Apr 2012 16:34:31 +0000 (12:34 -0400)
plugin/gdiplus/gvrender_gdiplus.cpp

index e5b0995f4847be1c332e758d216142e317b4fce4..016000b47d235021418973def3c0b9d981d6fcf8 100755 (executable)
@@ -211,6 +211,24 @@ static void gdiplusgen_path(GVJ_t *job, const GraphicsPath *path, int filled)
        /* draw the given path from job pen color and pen width */
        Pen draw_pen(Color(job->obj->pencolor.u.rgba [3], job->obj->pencolor.u.rgba [0], job->obj->pencolor.u.rgba [1], job->obj->pencolor.u.rgba [2]),
                job->obj->penwidth);
+
+       /* 
+        * Set line type
+        * See http://msdn.microsoft.com/en-us/library/ms535050%28v=vs.85%29.aspx
+        */
+       switch (job->obj->pen) {
+       case PEN_NONE:
+               return;
+       case PEN_DASHED:
+               draw_pen.SetDashStyle(DashStyleDash);
+               break;
+       case PEN_DOTTED:
+               draw_pen.SetDashStyle(DashStyleDot);
+               break;
+       case PEN_SOLID:
+               break;
+       }
+
        context->DrawPath(&draw_pen, path);
 }