.NET GDI+: Drawing lines with rounded corners

后端 未结 3 957
名媛妹妹
名媛妹妹 2021-01-21 09:52

Given an array of points, it is easy to draw a line based on these, e.g. using the GraphicsPath class.

For instance, the following array of points...

[0]         


        
3条回答
  •  孤街浪徒
    2021-01-21 10:29

    This url has a description of how to draw rounded rectangles that might help you start out.

    But I would think that if nothing else you would be able to add more points to your path, to give the illusion of rounded corners. So add in several points between 0,0 and 100,0. An example might be:

    (0,0) (90,0) (95,5) (95,10) (0,100)

    I have not tested that path in any way, just pulled some numbers that might work out of the air :).

提交回复
热议问题