如何确定锚点的System.Windows.Media.DrawingContext?与RenderTransformOrigin中的图像完全一样,WPF控制。
Dim InImage As New BitmapImage(New Uri("Image Path"))
Dim DrawingGroup As New DrawingGroup
Dim DrawingContext As DrawingContext = DrawingGroup.Open
DrawingContext.PushTransform(New RotateTransform(53))
DrawingContext.DrawImage(InImage, New Rect(0, 0, 500, 500))
DrawingContext.Close()我想渲染图像使用几个锚点。
发布于 2014-07-20 14:14:19
我认为你指的是锚点作为旋转所围绕的点。所以你可以通过RotateTransform设置这个点。它具有一对属性,即CenterX和CenterY。
...
Dim Rotating As New RotateTransform(53)
Rotating.CenterX = Some_Value_For_X
Rotating.CenterY = Some_Value_For_Y
DrawingContext.PushTransform(Rotating)
...https://stackoverflow.com/questions/24850428
复制相似问题