다음을 통해 공유


_IManipulationEvents::ManipulationCompleted 메서드(manipulations.h)

조작 또는 관성 완료 시 이벤트를 처리합니다.

구문

HRESULT ManipulationCompleted(
  [in] FLOAT x,
  [in] FLOAT y,
  [in] FLOAT cumulativeTranslationX,
  [in] FLOAT cumulativeTranslationY,
  [in] FLOAT cumulativeScale,
  [in] FLOAT cumulativeExpansion,
  [in] FLOAT cumulativeRotation
);

매개 변수

[in] x

사용자 정의 좌표의 원본 x 좌표입니다.

[in] y

사용자 정의 좌표의 원본 y 좌표입니다.

[in] cumulativeTranslationX

사용자 정의 좌표에서 조작이 시작된 이후 x축에 대한 총 변환입니다.

[in] cumulativeTranslationY

사용자 정의 좌표에서 조작이 시작된 이후의 y축에 대한 총 변환입니다.

[in] cumulativeScale

원래 크기의 백분율로 조작이 시작된 이후의 총 크기 변경입니다.

[in] cumulativeExpansion

사용자 정의 좌표에서 조작이 시작된 이후의 총 확장 변경입니다.

[in] cumulativeRotation

라디안에서 조작이 시작된 이후의 총 회전 변경입니다.

반환 값

메서드가 성공하면 S_OK가 반환되고, 실패하면 HRESULT 오류 코드를 반환합니다.

설명

조작 이벤트는 IInertiaProcessorIManipulationProcessor 인터페이스 모두에 대해 생성됩니다. ProcessUp 호출에서 TOUCHINPUT 구조체의 값을 사용하는 경우 좌표는 수백 픽셀 단위입니다.

참고 관성을 사용하는 경우 IInertiaProcessor::Complete 를 호출하면 현재 조작을 강제로 추정하여 큰 델타가 ManipulationCompleted 이벤트에 전달될 수 있습니다. 이 문제를 해결하려면 델타 이벤트 외에도 완료된 이벤트에 대한 업데이트를 수행합니다.
 

예제

다음 코드는 ManipulationCompleted 메서드의 구현을 보여줍니다.




HRESULT STDMETHODCALLTYPE CManipulationEventSink::ManipulationCompleted( 
    /* [in] */ FLOAT x,
    /* [in] */ FLOAT y,
    /* [in] */ FLOAT cumulativeTranslationX,
    /* [in] */ FLOAT cumulativeTranslationY,
    /* [in] */ FLOAT cumulativeScale,
    /* [in] */ FLOAT cumulativeExpansion,
    /* [in] */ FLOAT cumulativeRotation)
{
    m_cCompletedEventCount ++;

    m_fX = x;
    m_fY = y;
    m_fCumulativeTranslationX = cumulativeTranslationX;
    m_fCumulativeTranslationY = cumulativeTranslationY;
    m_fCumulativeScale = cumulativeScale;
    m_fCumulativeExpansion = cumulativeExpansion;
    m_fCumulativeRotation = cumulativeRotation;

    // Place your code handler here to do any operations based on the manipulation.

    return S_OK;
}
    
    

요구 사항

요구 사항
지원되는 최소 클라이언트 Windows 7 [데스크톱 앱만 해당]
지원되는 최소 서버 Windows Server 2008 R2 [데스크톱 앱만 해당]
대상 플랫폼 Windows
헤더 manipulations.h(Manipulations.h 포함)

추가 정보

관리되지 않는 코드에 조작 지원 추가

비관리 코드에서 관성 처리

메서드

_IManipulationEvents