Editing or Copying Pen Data

The functions listed below add, delete, or copy coordinate data to and from an HPENDATA object.

An empty HPENDATA object has the following value for the wPndts member of its PENDATAHEADER structure:

PDTS_NOUPPOINTS | PDTS_NOCOLLINEAR | PDTS_NOEMPTYSTROKES

For a full list of PDTS_ values, see Chapter 13, "Pen Application Programming Interface Constants." See Chapter 11 for a description of PENDATAHEADER.

Functions in the following list with a name prefix of Add, Insert, Extract, or Remove add to or delete from an HPENDATA object. These functions check the results of their operation and adjust the value in wPndts accordingly.

Function
Description
AddPenDataHRC
Copies the pen data from an HPENDATA object to an HRC object. This function provides the means for deferred recognition. An application can gather pen data into an HPENDATA block, manipulate or store it if desired, then later copy the data to an HRC object for recognition.
AddPointsPenData
Appends a set of points, including a STROKEINFO structure and any corresponding OEM data, to an HPENDATA object.
ExtractPenDataPoints
Copies points and OEM data from an HPENDATA block to supplied buffers. The application can convert the points to screen resolution with the TPtoDP function to reduce the buffer size. The application can also optionally delete these points from the original pen data.
ExtractPenDataStrokes
Copies selected strokes from an HPENDATA block, optionally creating a new HPENDATA block containing the copied strokes. ExtractPenDataStrokes can optionally delete the original strokes.
GetPointsFromPenData
Retrieves information from an HPENDATA object in a way similar to the GetPenDataStroke function. However, GetPointsFromPenData copies the required data to buffers supplied by the application rather than simply returning pointers to the original data in the global heap. Therefore, the application need not call BeginEnumStrokes and/or EndEnumStrokes when using GetPointsFromPenData.
InsertPenData
Merges two separate HPENDATA objects into a single object.
InsertPenDataPoints
Inserts points into the stroke of an existing HPENDATA object. InsertPenDataPoints automatically updates the stroke and pen data headers.
This function can adversely affect recognition accuracy for data that must later be recognized.
InsertPenDataStroke
Inserts an entire stroke into an existing HPENDATA object. InsertPenDataStroke automatically updates the stroke and pen data headers. The ink of the inserted stroke has default color and width. To change these attributes, call SetStrokeAttributes after inserting the stroke.
PenDataToBuffer
PenDataFromBuffer
Copy an HPENDATA object as sequential data from and to a buffer. PenDataFromBuffer creates and loads an HPENDATA object with the data from the sequential buffer created by PenDataToBuffer. These functions are used to transfer pen data to and from a file or the clipboard.
RemovePenDataStrokes
Deletes a contiguous set of strokes from an HPENDATA object.

Software for developers
Delphi Components
.Net Components
Software for Android Developers
More information resources
MegaDetailed.Net
Unix Manual Pages
Delphi Examples
Databases for Amazon shops developers
Amazon Categories Database
Browse Nodes Database