Bagikan melalui


Renderer.Rotate Method (Single, Point)

Applies a rotation of a specified amount about th origin to the GetViewTransform.

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

Syntax

'Declaration
Public Sub Rotate ( _
    degrees As Single, _
    point As Point _
)
'Usage
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 function Rotate(
    degrees : float, 
    point : Point
)

Parameters

  • degrees
    Type: System.Single

    The degrees by which to rotate clockwise.

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 around the center of the Ink object.

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);
...

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 around the center of the Ink object.

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)
...

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