IDirectManipulationViewport::SetViewportTransform method (directmanipulation.h)
Specifies the transform from the viewport coordinate system to the window client coordinate system.
HRESULT SetViewportTransform( const float *matrix, DWORD pointCount );
The transform matrix, in row-wise order: _11, _12, _21, _22, _31, _32.
The size of the transform matrix. This value is always 6, because a 3x2 matrix is used for all direct manipulation transforms.
If the method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Call this function to specify the viewport position, scaling and orientation on the screen. Viewport position, scaling, orientation and size are uniquely determined by the viewport transform and the viewport rectangle. The application can specify the viewport transform using this method, and the viewport rectangle using SetViewportRect.
The viewport rectangle (the rectangular area inside the content that is visible to the user) is specified in viewport coordinates. If the viewport rectangle top-left point is (0,0), the viewport rectangle is positioned exactly at the viewport coordinate system origin. Viewports offset from the viewport coordinate system origin can be specified in two ways:
- Through the viewport rectangle top-left point
- Through the viewport transform translation component (_31, _32)
- Viewport rectangle offset
- Viewport transform (from viewport to client coordinate system)
- Client to screen mapping (from client to screen coordinate system)
|Minimum supported client||Windows 8 [desktop apps only]|
|Minimum supported server||Windows Server 2012 [desktop apps only]|