You can draw a line: I know that because your other questions indicate it.

You can draw a hexagon: you have said so.

So ... draw a line. Use one of the end points as the center of the hexagon and offset the other six points you need from that: simple geometry using the angles which depend on the orientation of the hexagon.

15,748,477 members

Although I have just spent the last half hour studying Hexagon[^].

Public Sub DrawHex(x As Integer, y As Integer)

Dim side As Integer = 25 '' the length of the side of a hex

Dim ShortSide As Single = Convert.ToSingle(System.Math.Sin(30 * System.Math.PI / 180) * side)

Dim LongSide As Single = Convert.ToSingle(System.Math.Cos(30 * System.Math.PI / 180) * side)

Dim Points(5) As PointF

Points(0) = New PointF(x, y)

Points(1) = New PointF(x + side, y)

Points(2) = New PointF(x + side + ShortSide, y + LongSide)

Points(3) = New PointF(x + side, y + LongSide + LongSide)

Points(4) = New PointF(x, y + LongSide + LongSide)

Points(5) = New PointF(x - ShortSide, y + LongSide)

bmg.DrawPolygon(p, Points)

End Sub

but my problem is that I need draw a line that have a hexagon at the end.

In a new post, I will show a picture of what I want