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:
hIGear | HIGEAR handle to the image. |
lpMarkIndex | Mark identifier returned. |
lpMarkAttr | 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 Professional.
Sample:
Annotation
Example:
Copy Code | |
---|---|
HIGEAR hIGear; /* HIGEAR handle of image */ BOOL fSelected; /* flag for whether mark has been selected */ AT_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:
- hIGear does not reference a valid ImageGear handle.
- The memory pointed to by lpMarkAttr is read-only (or not NULL), invalid or not large enough.
- The memory pointed to by lpMarkIndex is read-only, invalid or not large enough.