Bagikan melalui


Renderer.Rotate Method (Single)

Applies a rotation of a specified amount about a specified point to the GetViewTransform.

Namespace:  Microsoft.Ink
Assembly:  Microsoft.Ink (in Microsoft.Ink.dll)

Syntax

'Declaration
Public Sub Rotate ( _
    degrees As Single _
)
'Usage
Dim instance As Renderer 
Dim degrees As Single

instance.Rotate(degrees)
public void Rotate(
    float degrees
)
public:
void Rotate(
    float degrees
)
public function Rotate(
    degrees : float
)

Parameters

  • degrees
    Type: System.Single

    The degrees by which to rotate clockwise.

Remarks

The rotation is centered around the origin.

Examples

This C# example saves the current view transform matrix from the Renderer object in the InkCollector object, theInkCollector, and then applies a rotation of 60 degrees to it.

using System.Drawing.Drawing2D;
...
Matrix theOldMatrix = new Matrix();
theInkCollector.Renderer.GetViewTransform(ref theOldMatrix);
theInkCollector.Renderer.Rotate(60.0f);
...

This Microsoft® Visual Basic® .NET example saves the current view transform matrix from the Renderer object in the InkCollector object, theInkCollector, and then applies a rotation of 60 degrees to it.

Imports System.Drawing.Drawing2D
...
Dim theOldMatrix As New Matrix()
theInkCollector.Renderer.GetViewTransform(theOldMatrix)
theInkCollector.Renderer.Rotate(60.0)
...

Platforms

Windows 7, Windows Vista, Windows Server 2008 R2, Windows Server 2008

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

Renderer Class

Renderer Members

Rotate Overload

Microsoft.Ink Namespace