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