다음을 통해 공유


Graphics::ResetTransform 메서드(gdiplusgraphics.h)

Graphics::ResetTransform 메서드는 이 Graphics 개체의 월드 변환 매트릭스를 ID 행렬로 설정합니다.

구문

Status ResetTransform();

반환 값

형식: 상태

메서드가 성공하면 Status 열거형의 요소인 확인을 반환합니다.

메서드가 실패하면 Status 열거형의 다른 요소 중 하나를 반환합니다.

설명

ID 행렬은 아무 작업도 수행하지 않는 변환을 나타냅니다. Graphics 개체의 월드 변환 매트릭스가 ID 행렬인 경우 해당 Graphics 개체가 그린 항목에는 월드 변환이 적용되지 않습니다.

예제

다음은 Graphics 개체의 월드 변환을 45도 회전으로 설정한 다음 사각형을 그리는 예제입니다. 이 코드는 Graphics 개체의 ResetTransform 메서드를 호출한 다음 두 번째 사각형을 그립니다. 두 번째 사각형에는 회전 변환이 적용되지 않습니다.

VOID Example_ResetTransform(HDC hdc)
{
   Graphics graphics(hdc);

   // Rotate the transformation and draw a rectangle.
   graphics.RotateTransform(45.0f);
   Pen blackPen(Color(255, 0, 0, 0));
   graphics.DrawRectangle(&blackPen, 100, 0, 100, 50);

   // Reset the transformation to identity, and draw a second rectangle.
   graphics.ResetTransform();
   Pen redPen(Color(255, 255, 0, 0));
   graphics.DrawRectangle(&redPen, 110, 0, 100, 50);
}

요구 사항

요구 사항
지원되는 최소 클라이언트 Windows XP, Windows 2000 Professional [데스크톱 앱만 해당]
지원되는 최소 서버 Windows 2000 Server[데스크톱 앱만]
대상 플랫폼 Windows
헤더 gdiplusgraphics.h(Gdiplus.h 포함)
라이브러리 Gdiplus.lib
DLL Gdiplus.dll

참고 항목

좌표계 및 변환

그래픽

그래픽::GetTransform

그래픽::MultiplyTransform

그래픽::RotateTransform

그래픽::ScaleTransform

그래픽::SetTransform

그래픽::TransformPoints

그래픽::TranslateTransform

행렬

MatrixOrder

변환