Поделиться через


Strokes.Rotate - метод

Обновлен: Ноябрь 2007

Rotates the Strokes collection around a center point.

Пространство имен:  Microsoft.Ink
Сборка:  Microsoft.Ink (в Microsoft.Ink.dll)

Синтаксис

'Декларация
Public Sub Rotate ( _
    degrees As Single, _
    point As Point _
)
'Применение
Dim instance As Strokes
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
)

Параметры

  • degrees
    Тип: System.Single
    The degrees by which to rotate clockwise.

Примеры

In this example, a Strokes collection of an InkOverlay,object is rotated clockwise 60 degrees. The rotation occurs around the center of the bounding box of the Strokes collection.

' Access to the Strokes property returns a copy of the Strokes object.
' This copy must be implicitly (via using statement) or explicitly
' disposed of in order to avoid a memory leak.
Using allStrokes As Strokes = mInkOverlay.Ink.Strokes
    Dim bounds As Rectangle = allStrokes.GetBoundingBox()
    ' create a point at the center of bounding box
    Dim center As Point = New Point(bounds.Left + (bounds.Width / 2), bounds.Top + (bounds.Height / 2))
    allStrokes.Rotate(60.0F, center)
End Using
// Access to the Strokes property returns a copy of the Strokes object.
// This copy must be implicitly (via using statement) or explicitly
// disposed of in order to avoid a memory leak.
using (Strokes allStrokes = mInkOverlay.Ink.Strokes)
{
    Rectangle bounds = allStrokes.GetBoundingBox();
    // create a point at the center of bounding box
    Point center = new Point(bounds.Left+(bounds.Width/2), bounds.Top+(bounds.Height/2));
    allStrokes.Rotate(60.0f, center);
}

Платформы

Windows Vista

Среды .NET Framework и .NET Compact Framework поддерживают не все версии каждой платформы. Поддерживаемые версии перечислены в разделе Требования к системе для .NET Framework.

Сведения о версии

.NET Framework

Поддерживается в версии: 3.0

См. также

Ссылки

Strokes Класс

Strokes - члены

Microsoft.Ink - пространство имен

Strokes.Transform

Stroke.Rotate