IDirectManipulationPrimaryContent::SetSnapPoints method (directmanipulation.h)

Specifies the snap points for the inertia rest position.

Syntax

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

Parameters

[in] motion

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.

[in] points

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.

[in] pointCount

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

Requirement Value
Minimum supported client Windows 8 [desktop apps only]
Minimum supported server Windows Server 2012 [desktop apps only]
Target Platform Windows
Header directmanipulation.h

See also

IDirectManipulationPrimaryContent

SetSnapCoordinate

SetSnapInterval