Strokes.Rotate, méthode
Mise à jour : November 2007
Fait pivoter la collection Strokes autour d'un point central.
Espace de noms : Microsoft.Ink
Assembly : Microsoft.Ink (dans Microsoft.Ink.dll)
Syntaxe
'Déclaration
Public Sub Rotate ( _
degrees As Single, _
point As Point _
)
'Utilisation
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
)
Paramètres
- degrees
Type : System.Single
Degrés de rotation dans le sens des aiguilles d'une montre.
- point
Type : System.Drawing.Point
Point (dans les coordonnées d'espace d'entrée manuscrite) autour duquel effectuer la rotation.
Exemples
Dans cet exemple, la collection Strokes d'un objet InkOverlay pivote de 60 degrés dans le sens des aiguilles d'une montre. La rotation se produit autour du centre du cadre englobant de la collection Strokes.
' 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);
}
Plateformes
Windows Vista
Le .NET Framework et le .NET Compact Framework ne prennent pas en charge toutes les versions de chaque plateforme. Pour obtenir la liste des versions prises en charge, consultez Configuration requise du .NET Framework.
Informations de version
.NET Framework
Pris en charge dans : 3.0