다음을 통해 공유


Stroke.Rotate 메서드

업데이트: 2007년 11월

중심점을 기준으로 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
    시계 방향으로 회전할 각도입니다.

예제

이 예제에서는 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에서 지원

참고 항목

참조

Stroke 클래스

Stroke 멤버

Microsoft.Ink 네임스페이스

Stroke.Transform

Strokes.Rotate