Stroke.Rotate - метод
Обновлен: Ноябрь 2007
Rotates the Stroke object around a center point.
Пространство имен: Microsoft.Ink
Сборка: Microsoft.Ink (в Microsoft.Ink.dll)
Синтаксис
'Декларация
Public Sub Rotate ( _
degrees As Single, _
point As Point _
)
'Применение
Dim instance As Stroke
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.
- point
Тип: System.Drawing.Point
The point—in ink space coordinates—around which to rotate.
Примеры
In this example, each selected Stroke of an InkOverlay object is rotated clockwise 60 degrees. The rotation occurs around the center of the ink control.
Dim inkControl As Control = mInkOverlay.AttachedControl
' get the center of the ink control
Dim centerPt As Point = New Point(inkControl.Width / 2, inkControl.Height / 2)
Using g As Graphics = inkControl.CreateGraphics()
' convert center point to ink space coordinates
mInkOverlay.Renderer.PixelToInkSpace(g, centerPt)
End Using
For Each S As Stroke In mInkOverlay.Selection
S.Rotate(60.0F, centerPt)
Next
Control inkControl = mInkOverlay.AttachedControl;
// get the center of the ink control
Point centerPt = new Point(inkControl.Width / 2, inkControl.Height / 2);
using (Graphics g = inkControl.CreateGraphics())
{
// convert center point to ink space coordinates
mInkOverlay.Renderer.PixelToInkSpace(g, ref centerPt);
}
foreach (Stroke S in mInkOverlay.Selection)
{
S.Rotate(60.0f, centerPt);
}
Платформы
Windows Vista
Среды .NET Framework и .NET Compact Framework поддерживают не все версии каждой платформы. Поддерживаемые версии перечислены в разделе Требования к системе для .NET Framework.
Сведения о версии
.NET Framework
Поддерживается в версии: 3.0