Compartilhar via


IXRStrokeCollection::HitTest (Compact 2013)

3/28/2014

This method indicates whether a specified IXRStylusPointCollection object intersects with an IXRStrokeCollection object.

Syntax

virtual HRESULT STDMETHODCALLTYPE HitTest(
    IXRStylusPointCollection* pStylusPointCollection,
    IXRStrokeCollection** ppStrokeCollection
) = 0;

Parameters

  • ppStrokeCollection
    [out] Address of a pointer to an IXRStrokeCollection object that contains the strokes that intersect with the points specified in pStylusPointCollection.

Return Value

Returns S_OK if successful; otherwise, returns an HRESULT error code. For common error codes for XAML for Windows Embedded, see XAML for Windows Embedded Error Messages.

Remarks

The following illustration shows the position of an IXRStrokeCollection named MyStrokes that contains strokes S0, S1, and S2, and an IXRStylusPointCollection named mySPC that contains points P0, P1, P2, and P3.

Ink Stroke Example

If you make the following HitTest call, the IXRStrokeCollection object in ppValue contains S1 and S2 on return.

IXRStrokeCollection myIntersectedStrokes;
MyStrokes->HitTest(mySPC, myIntersectedStrokes);

.NET Framework Equivalent

System.Windows.Ink.StrokeCollection.HitTest

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

IXRStrokeCollection
IXRStylusPointCollection