ImageGear Professional v18.2 > API Reference Guide > ART Component API Reference > ART Component Functions Reference > GUI Functions > ART_GUI_mark_hit_test |
This function returns all mark indexes that are within the rectangle specified by lpRect.
Copy Code
|
|
---|---|
AT_ERRCOUNT ART_GUI_mark_hit_test(
HIGEAR hIGear,
HWND hWnd,
DWORD dwGrpID,
const LPAT_RECT lpRect,
LPART_MARK_INDEX lpMarkIndex,
DWORD dwMarkCount,
LPDWORD lpMarkCount,
LPAT_MODE lpResizeBox,
LPDWORD lpBoxIndex
);
|
Name | Type | Description |
hIGear | HIGEAR | HIGEAR handle to the image. |
hWnd | HWND | HWND handle to the window. |
dwGrpID | DWORD | Identifier of group. |
lpRect | const LPAT_RECT | Far pointer to an AT_RECT struct specifying the rectangular portion of image to search for marks. |
lpMarkIndex | LPART_MARK_INDEX | A far pointer returning the indexes. |
dwMarkCount | DWORD | The amount of memory available for returned marks. |
lpMarkCount | LPDWORD | The number of marks actually returned. |
lpResizeBox | LPAT_MODE | A far pointer to a defined constant of type AT_MODE, only used if the rectangle lpRect is an individual point and is over a resize handle. |
lpBoxIndex | LPDWORD | A far pointer to the index of the resize handle, or NULL if the return value is not needed. |
Returns the number of ImageGear errors that occurred during the function call.
All pixel formats supported by ImageGear Professional.
Annotation
Copy Code
|
|
---|---|
HIGEAR hIGear; /* HIGEAR handle of */ /* image */ AT_ERRCOUNT nErrcount; /* Tally of IG errors on */ /* stack */ AT_RECT MarkRect; /* Region of image to */ /* query */ ART_MARK_INDEX MarkIndexes; /* Array of mark indexes */ DWORD MarkCount; /* Space available for */ /* marks or # of marks */ AT_MODE lpResizeBox; /* Handle to resize box, */ /* if there is one */ AT_DIMENSION nWidth, /* Original width and */ /* height */ nHeight; UINT nBpp; /* Bits per pixel */ /* (not used) */ AT_DIMENSION nHalfWidth, /* Will hold half the */ /* width */ nHalfHeight; /* and half the height */ HWND HWnd; DWORD dwGrpID; /* Set rectangle to half the size of the image, centered */ if ( IG_image_is_valid (hIGear) ) { IG_image_dimensions_get ( &hIGear, &nWidth, &nHeight, &nBpp ); nHalfWidth = nWidth / 2; nHalfHeight = nHeight / 2; MarkRect.left = nHalfWidth / 2; MarkRect.right = MarkRect.left + nHalfWidth - 1; MarkRect.top = nHalfHeight / 2; MarkRect.bottom = MarkRect.top + nHalfHeight - 1; dwGrpID = IG_GRP_DEFAULT; nErrcount = ART_GUI_mark_hit_test(hIGear, hWnd, dwGroupID, &MarkRect, &MarkIndexes, MarkCount, &MarkCount, &lpResizeBox, &lpBoxIndex); } |
The rectangle represents screen coordinates.
There is some variation in what is returned: