IDirectManipulationPrimaryContent::SetSnapPoints method

Specifies the snap points for the inertia rest position.

Syntax


HRESULT SetSnapPoints(
  [in]       DIRECTMANIPULATION_MOTION_TYPES motion,
  [inconst float                           *points,
  [in]       DWORD                           pointCount
);

Parameters

motion [in]

One or more of the DIRECTMANIPULATION_MOTION_TYPES enumeration values. Only DIRECTMANIPULATION_MOTION_TRANSLATE_X, DIRECTMANIPULATION_MOTION_TRANSLATE_Y, or DIRECTMANIPULATION_MOTION_ZOOM are allowed.

points [in]

An array of snap points within the boundaries of the content to snap to. Should be specified in increasing order relative to the origin set in SetSnapCoordinate.

pointCount [in]

The size of the array of snap points. Should be greater than 0.

Return value

If the method succeeds, it returns S_OK. If there is no change in the snap points, this method can return S_FALSE. Otherwise, it returns an HRESULT error code. If invalid snap points are specified, existing snap points might be affected.

Remarks

If snap points are invalid (for example, outside of the content boundaries), they are ignored and the content is always within the content boundaries.

Requirements

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

DirectManipulation.h

IDL

DirectManipulation.idl

IID

IID_IDirectManipulationPrimaryContent is defined as C12851E4-1698-4625-B9B1-7CA3EC18630B

See also

IDirectManipulationPrimaryContent
SetSnapCoordinate
SetSnapInterval

 

 

Community Additions

ADD
Show: