IAnalysisRegion::GetRegionScans method
Retrieves an array of rectangles that defines the area of the IAnalysisRegion.
Syntax
HRESULT GetRegionScans(
[out] ULONG *pulCount,
[out] RECT **pRegionScans
);
Parameters
-
pulCount [out]
-
The number of rectangles returned in pRegionScans.
-
pRegionScans [out]
-
A pointer to an array of rectangles that defines the area of the IAnalysisRegion.
Return value
For a description of the return values, see Classes and Interfaces - Ink Analysis.
Remarks
If pRegionScans is passed as NULL, the GetRegionScans method returns S_OK and the number of rectangles is returned in pulCount.
Caution
To avoid a memory leak, use CoTaskMemFree to release the memory from *pRegionScans when you no longer need the information.
The bounds of the rectangles are in ink-space coordinates.
The union of the returned rectangles represents the area of the IAnalysisRegion.
Examples
The following example shows how to get the rectangles that define the area of the IAnalysisRegion, region
and how to get only the number of rectangles.
// Get the count and the rectangles.
ULONG count = 0;
RECT* rects = 0;
region->GetRegionScans(&count, &rects);
// Use rects
::CoTaskMemFree(rects);
// GetRegionScans just gets the count and returns S_OK
ULONG number = 0;
region->GetRegionScans(&number, NULL);
Requirements
Requirement | Value |
---|---|
Minimum supported client |
Windows XP Tablet PC Edition [desktop apps only] |
Minimum supported server |
None supported |
Header |
|
DLL |
|