# PRC_ResampleStrokes*

## C Specification

      #include <nitro/prc.h>

      BOOL PRC_ResampleStrokes_Distance(
          u16*                    selectedPoints,
          int*                    pSelectedPointNum,
          int                     maxPointCount,
          int                     maxStrokeCount,
          const PRCStrokes*       strokes,
          int                     threshold,
          void*                   buffer );

      BOOL PRC_ResampleStrokes_Angle(
          u16*                    selectedPoints,
          int*                    pSelectedPointNum,
          int                     maxPointCount,
          int                     maxStrokeCount,
          const PRCStrokes*       strokes,
          int                     threshold,
          void*                   buffer );

      BOOL PRC_ResampleStrokes_Recursive(
          u16*                    selectedPoints,
          int*                    pSelectedPointNum,
          int                     maxPointCount,
          int                     maxStrokeCount,
          const PRCStrokes*       strokes,
          int                     threshold,
          void*                   buffer );

## Arguments

selectedPoints | Pointer to an array in which the position numbers of the points selected are returned in ascending order.
pSelectedPointNum | Pointer to the `int` variable that accepts how many points were returned in `selectedPoints`.
maxPointCount | Maximum number of points after resampling.
maxStrokeCount | Maximum number of strokes after resampling.
strokes | Raw input stroke data.
threshold | Resampling threshold.
buffer | Pointer to the memory region that will be used during processing.

## Return Values

Returns TRUE if resampling is successful and set of points with a valid length is obtained.

## Description

Uses the resampling algorithms to resample stroke data. The result of this function returns in a `u16` array, `selectedPoints`, which is the position number of the points in `strokes->points` that remain after resampling. The results also return in `pSelectedPointNum`, which is the number of points. In the array, the numbers are stored in ascending order. You must allocate a size of at least `maxPointCount` for `selectedPoints`.

`buffer` provides a pointer to the work area used for the resampling process. The work area requires `sizeof(int)*maxPointCount`. Allocate this beforehand.

For details on the resampling algorithms and thresholds, see `PRCResampleMethod`.

This function is not required for normal pattern recognition procedures. They are called automatically from `PRC_InitInputPattern*`.

## See Also

`PRCResampleMethod, PRC_InitInputPattern*`

## Revision History

03/04/2005 Changed return value to BOOL

07/06/2004 Initial Version

CONFIDENTIAL