Stroke.Rotate メソッド
中心点を基準として Stroke オブジェクトを回転します。
名前空間 : 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
時計回りに回転する角度。
- point
型 : System.Drawing.Point
インク空間座標において、回転の基準とするポイント。
例
この例では、InkOverlay オブジェクトで選択された各 Stroke オブジェクトが時計回りに 60 度回転されます。回転はインク コントロールの中心を基準として行われます。
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