2
我正在用Streamgeometry来新绘制一个简单的箭头。现在我需要将箭头转到指定的角度。但如何旋转这个几何?旋转几何路径
Dim pt1 As New Point(X1, Me.Y1) 'left point
Dim pt2 As New Point(_X2, Me.Y2) 'right point
Dim pt3 As New Point(_X2 + (HeadWidth * cost - HeadHeight * sint), Y2 + (HeadWidth * sint + HeadHeight * cost)) 'arrow line down
Dim pt4 As New Point(_X2 + (HeadWidth * cost + HeadHeight * sint), Y2 - (HeadHeight * cost - HeadWidth * sint)) 'arrow line up
context.BeginFigure(pt1, True, False)
context.LineTo(pt2, True, True)
context.LineTo(pt3, True, True)
context.LineTo(pt2, True, True)
context.LineTo(pt4, True, True)
感谢您的回答。我尝试过,但如果我像你所建议的那样使用Rotatetransform来创建几何体,那么它就不会起作用。我不知道为什么。 – Nasenbaer 2011-06-17 12:44:33