Renderer.Rotate 方法 (Single, Point)

GetViewTransform 应用围绕原点的指定量的旋转。

命名空间:  Microsoft.Ink
程序集:  Microsoft.Ink(在 Microsoft.Ink.dll 中)

语法

声明
Public Sub Rotate ( _
    degrees As Single, _
    point As Point _
)
用法
Dim instance As Renderer
Dim degrees As Single
Dim point As Point

instance.Rotate(degrees, point)
public void Rotate(
    float degrees,
    Point point
)
public:
void Rotate(
    float degrees, 
    Point point
)
public void Rotate(
    float degrees,
    Point point
)
public function Rotate(
    degrees : float, 
    point : Point
)

参数

示例

此 C# 示例从 InkCollector 对象 theInkCollector 中的 Renderer 对象保存当前视图变换矩阵,然后对该对象应用以 Ink 对象的中心为轴的 60 度旋转。

using System.Drawing.Drawing2D;
...
Matrix theOldMatrix = new Matrix();
theInkCollector.Renderer.GetViewTransform(ref theOldMatrix);
Rectangle bounds = theInkCollector.Ink.GetBoundingBox();
Point center = new Point((bounds.Left + bounds.Right) / 2,
    (bounds.Top + bounds.Bottom) / 2);
theInkCollector.Renderer.Rotate(60.0f, center);
...

此 Microsoft(R) Visual Basic(R) .NET 示例从 InkCollector 对象 theInkCollector 中的 Renderer 对象保存当前视图变换矩阵,然后对该对象应用以 Ink 对象的中心为轴的 60 度旋转。

Imports System.Drawing.Drawing2D
...
Dim theOldMatrix As New Matrix()
theInkCollector.Renderer.GetViewTransform(theOldMatrix)
Dim bounds As Rectangle = theInkCollector.Ink.GetBoundingBox()
Dim center As Point = new Point((bounds.Left + bounds.Right) / 2,
    (bounds.Top + bounds.Bottom) / 2)
theInkCollector.Renderer.Rotate(60.0, center)
...

平台

Windows Vista

.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求

版本信息

.NET Framework

受以下版本支持:3.0

另请参见

参考

Renderer 类

Renderer 成员

Rotate 重载

Microsoft.Ink 命名空间