ImageGear for C and C++ on Windows v19.1 - Updated
ART_mark_first
API Reference Guide > ART Component API Reference > ART Component Functions Reference > Mark Management Functions > ART_mark_first

This function returns the mark index of the first mark associated with the HIGEAR image.

Declaration:

 
Copy Code
AT_ERRCOUNT ART_mark_first(
        HIGEAR hIGear, 
        LPART_MARK_INDEX lpMarkIndex, 
        LPART_MARK_ATTRIBUTES lpMarkAttr
);

Arguments:

Name Type Description
hIGear HIGEAR HIGEAR handle to the image.
lpMarkIndex LPART_MARK_INDEX Mark identifier returned.
lpMarkAttr LPART_MARK_ATTRIBUTES Mark description returned or NULL.

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 */
BOOL fSelected; /* flag for whether mark has been 
selected */
ART_MARK_INDEX  hMarkIndex; /* index number for marks */
/* Get index of first mark created */
ART_mark_first(hIGear, &hMarkIndex, NULL);
/* While there are valid index number, iterate through them and select all of those marks
which have not yet been selected */
while (hMarkIndex != ART_INVALID_ID)
{
/* check to see if the mark is already selected */
ART_mark_is_selected(hIGear, hMarkIndex, &fSelected);
/* if not, then select it */
if (!fSelected)
{
ART_mark_select(hIGear, hMarkIndex, TRUE);
ART_mark_next(hIGear, &hMarkIndex, NULL);
}
}

Remarks:

The attributes for the mark are copied into lpMarkAttr. The lpMarkAttr parameter is set to NULL if the mark attributes are not needed. ART_mark_next() gets the mark index and attributes of the mark that follows the one that was passed into lpMarkIndex. These functions set lpMarkIndex to ART_INVALID_ID when there are no more marks to iterate through. Mark indexes are returned in the same order as the stacking order.

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