LinearGradientBrush.RotateTransform 메서드

정의

지정된 양만큼 로컬 기하학적 변환을 회전합니다. 이 메서드는 변환 앞에 회전을 추가합니다.

오버로드

Name Description
RotateTransform(Single)

지정된 양만큼 로컬 기하학적 변환을 회전합니다. 이 메서드는 변환 앞에 회전을 추가합니다.

RotateTransform(Single, MatrixOrder)

지정된 순서로 지정된 양만큼 로컬 기하학적 변환을 회전합니다.

RotateTransform(Single)

Source:
LinearGradientBrush.cs
Source:
LinearGradientBrush.cs
Source:
LinearGradientBrush.cs
Source:
LinearGradientBrush.cs
Source:
LinearGradientBrush.cs
Source:
LinearGradientBrush.cs
Source:
LinearGradientBrush.cs
Source:
LinearGradientBrush.cs
Source:
LinearGradientBrush.cs

지정된 양만큼 로컬 기하학적 변환을 회전합니다. 이 메서드는 변환 앞에 회전을 추가합니다.

public:
 void RotateTransform(float angle);
public void RotateTransform(float angle);
member this.RotateTransform : single -> unit
Public Sub RotateTransform (angle As Single)

매개 변수

angle
Single

회전 각도입니다.

예제

예제를 보려면 RotateTransform를 참조하세요.

적용 대상

RotateTransform(Single, MatrixOrder)

Source:
LinearGradientBrush.cs
Source:
LinearGradientBrush.cs
Source:
LinearGradientBrush.cs
Source:
LinearGradientBrush.cs
Source:
LinearGradientBrush.cs
Source:
LinearGradientBrush.cs
Source:
LinearGradientBrush.cs
Source:
LinearGradientBrush.cs
Source:
LinearGradientBrush.cs

지정된 순서로 지정된 양만큼 로컬 기하학적 변환을 회전합니다.

public:
 void RotateTransform(float angle, System::Drawing::Drawing2D::MatrixOrder order);
public void RotateTransform(float angle, System.Drawing.Drawing2D.MatrixOrder order);
member this.RotateTransform : single * System.Drawing.Drawing2D.MatrixOrder -> unit
Public Sub RotateTransform (angle As Single, order As MatrixOrder)

매개 변수

angle
Single

회전 각도입니다.

order
MatrixOrder

회전 행렬을 추가할지 아니면 앞에 추가할지 여부를 지정하는 A MatrixOrder 입니다.

예제

다음 코드 예제는 Windows Forms 사용하도록 설계되었으며 PaintEventArgs 이벤트 개체인 eOnPaint가 필요합니다. 코드

  • LinearGradientBrush를 만듭니다.

  • 이 브러시를 사용하여 화면에 줄임표를 그립니다.

  • 메서드를 LinearGradientBrush 호출하여 45도 회전합니다 RotateTransform .

  • 회전된 브러시를 사용하여 첫 번째 줄임표 바로 아래의 화면에 줄임표를 그립니다.

아래쪽 줄임표의 그라데이션은 위쪽 줄임표의 x축까지 45도 각도입니다. 또한 메서드 호출 TranslateTransform 은 그라데이션 채우기의 왼쪽 가장자리를 아래쪽 줄임표의 왼쪽 가장자리로 정당화하는 데 사용됩니다.

private:
   void RotateTransformExample( PaintEventArgs^ e )
   {
      // Create a LinearGradientBrush.
      Rectangle myRect = Rectangle(20,20,200,100);
      LinearGradientBrush^ myLGBrush = gcnew LinearGradientBrush( myRect,Color::Blue,Color::Red,0.0f,true );

      // Draw an ellipse to the screen using the LinearGradientBrush.
      e->Graphics->FillEllipse( myLGBrush, myRect );

      // Rotate the LinearGradientBrush.
      myLGBrush->RotateTransform( 45.0f, MatrixOrder::Prepend );

      // Rejustify the brush to start at the left edge of the ellipse.
      myLGBrush->TranslateTransform(  -100.0f, 0.0f );

      // Draw a second ellipse to the screen using
      // the transformed brush.
      e->Graphics->FillEllipse( myLGBrush, 20, 150, 200, 100 );
   }
 private void RotateTransformExample(PaintEventArgs e)
 {
              
     // Create a LinearGradientBrush.
     Rectangle myRect = new Rectangle(20, 20, 200, 100);
     LinearGradientBrush myLGBrush = new LinearGradientBrush(
         myRect, Color.Blue, Color.Red,  0.0f, true);
              
     // Draw an ellipse to the screen using the LinearGradientBrush.
     e.Graphics.FillEllipse(myLGBrush, myRect);
              
     // Rotate the LinearGradientBrush.
     myLGBrush.RotateTransform(45.0f, MatrixOrder.Prepend);

     // Rejustify the brush to start at the left edge of the ellipse.
     myLGBrush.TranslateTransform(-100.0f, 0.0f);
              
     // Draw a second ellipse to the screen using
     // the transformed brush.
     e.Graphics.FillEllipse(myLGBrush, 20, 150, 200, 100);
 }
Public Sub RotateTransformExample(ByVal e As PaintEventArgs)

    ' Create a LinearGradientBrush.
    Dim myRect As New Rectangle(20, 20, 200, 100)
    Dim myLGBrush As New LinearGradientBrush(myRect, Color.Blue, _
    Color.Red, 0.0F, True)

    ' Draw an ellipse to the screen using the LinearGradientBrush.
    e.Graphics.FillEllipse(myLGBrush, myRect)

    ' Rotate the LinearGradientBrush.
    myLGBrush.RotateTransform(45.0F, MatrixOrder.Prepend)

    ' Rejustify the brush to start at the left edge of the ellipse.
    myLGBrush.TranslateTransform(-100.0F, 0.0F)

    ' Draw a second ellipse to the screen using the transformed brush.
    e.Graphics.FillEllipse(myLGBrush, 20, 150, 200, 100)
End Sub

적용 대상