ImageGear for C and C++ on Windows v19.10 - Updated
ART_GUI_mark_paint
API Reference Guide > ART Component API Reference > ART Component Functions Reference > GUI Functions > ART_GUI_mark_paint

This function draws or redraws the mark referenced by hMarkIndex, in the window hWnd.

Declaration:

 
Copy Code
AT_ERRCOUNT ART_GUI_mark_paint(
        HIGEAR hIGear, 
        DWORD dwGrpID, 
        ART_MARK_INDEX hMarkIndex, 
        HWND hWnd, 
        BOOL fDraw
);

Arguments:

Name Type Description
hIGear HIGEAR HIGEAR handle to the image.
dwGrpID DWORD Identifier of group.
hMarkIndex ART_MARK_INDEX Index of the mark.
hWnd HWND Windows handle to the image window.
fDraw BOOL Flag of type BOOL that tells ART whether or not to paint the mark. If set to TRUE, ART paints the mark; if set to FALSE, ART temporarily erases the mark.

Return Value:

Returns the number of ImageGear errors that occurred during the function call.

Supported Raster Image Formats:

All pixel formats supported by ImageGear for C and C++.

Sample:

Annotation

Example:

 
Copy Code
HIGEAR  hIGear; /* HIGEAR handle of 
  image */
ART_MARK_ATTRIBUTES ma; /* Structure to hold 
mark's attributes */
ART_MARK_INDEX  hMarkIndex; /* Index to the */ 
/* mark  */
AT_ERRCOUNT  nErrcount; /* Tally of IG */
/* errors on the */
/* stack  */
HWND  hWnd; /* Windows handle */ 
/* to the image */
/* window  */
DWORD  dwGrpID;
nErrcount = ART_mark_create(hIGear, &ma, &hMarkIndex);
if (nErrcount != 0)
{
  ErrorReport(hWnd);
}
else
{
dwGrpID = IG_GRP_DEFAULT;
ART_GUI_mark_paint(hIGear, dwGrpID, hMarkIndex, 
hWnd, TRUE);
}

Remarks:

The flag fDraw tells whether to paint or erase the mark.

An error is set if any of the following conditions are met: