Renderer.Rotate Method
Renderer.Rotate Method |
Applies a rotation to the view transform.
Definition
Visual Basic .NET Public Sub Rotate( _
ByVal degrees As Single, _
ByVal point As Point _
)C# public void Rotate(
float degrees,
Point point
);Managed C++ public: void Rotate(
float *degrees,
Point *point
);
Parameters
degrees System.Single. The degrees by which to rotate clockwise. point System.Drawing.Point. The point—in ink space coordinates—around which to rotate.
Examples
[C#]
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); ...
[VB.NET]
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) ...