我想知道如何旋转使用Direct2D和SharpDX呈现的文本。
找不到任何可能性
RenderTarget2D.DrawText()
或
RenderTarget2D.DrawTextLayout()
发布于 2015-02-11 18:33:53
您可以使用一个Transformation Matrix,更准确地说,是一个通过3x2矩阵的旋转变换。
伪示例:
RenderTarget2D.BeginDraw;
try
// your regular drawings
....
// save the current tranform
currentTransform = RenderTarget2D.GetTransform;
// set a 90 degree rotation around the (100,100);
RenderTarget2D.SetTransform(Matrix3x2F.Rotation(90, Point2F(100,100)));
// do your rotated text drawings
RenderTarget2D.DrawText();
// restore your previous/original transform
RenderTarget2D.SetTransform(currentTransform);
finally
RenderTarget2D.EndDraw;
end;https://stackoverflow.com/questions/28456815
复制相似问题