How to draw borders for System.Drawing.Region?

时间:2015-06-25 19:03:53

标签: c#

I have Region that was created from two System.Drawing.Drawing2D.GraphicsPath objects using Union() method. How I can draw outline for this Region? Upd: I tried this: //Region RG = some region Pen P = new Pen(Brushes.Black); P.StartCap = P.EndCap = LineCap.Round; P.Width = 3; GraphicsPath GP = new GraphicsPath(); GP.AddRectangles(RG.GetRegionScans(new Matrix())); g.DrawPath(P, GP); g.FillRegion(new SolidBrush(fillColor), RG); But I think that this is not correct.

1 个答案:

答案 0 :(得分:0)

这是解决此问题的方法:

<html>
   <body>
      <h2>Servers</h2>
      <table border="1">
         <tr>
            <th>ID</th>
            <th>OS</th>
         </tr>
         <tr>
            <td>123</td>
            <td>abc</td>
         </tr>
         <tr>
            <td>456</td>
            <td>def</td>
         </tr>
      </table>
   </body>
</html>