This function gets the first block name.
Copy Code
|
|
---|---|
AT_ERRCOUNT ART_mark_block_first( HIGEAR hIGear, ART_MARK_INDEX hMarkIndex, LPART_BLOCK_NAME lpBlockName ); |
Name | Type | Description |
---|---|---|
hIGear | HIGEAR | HIGEAR handle to the image. |
hMarkIndex | ART_MARK_INDEX | Mark identifier. |
lpBlockName | LPART_BLOCK_NAME | A far pointer to an 8-byte array of memory that returns the type of block of the mark referenced by hMarkIndex. The block type is either an ART-defined constant beginning with ART_BLOCK or a user-defined block. See ARTAPI.H for the full list of ART-defined constants. |
Returns the number of ImageGear errors that occurred during the function call.
All pixel formats supported by ImageGear for C and C++.
Annotation
Copy Code
|
|
---|---|
HIGEAR hIGear; /* HIGEAR handle of image */ ART_MARK_INDEX hMarkIndex; /* index to mark */ ART_BLOCK_NAME lpBlockname; /* type of block */ /* to return */ CHAR szFileName[_MAX_PATH]; /* file name buffer */ DWORD dwBlockSize; /* size of a named Block */ nErrcount = ART_mark_block_first(hIGear, hMarkIndex, &lpBlockName); while (*lpBlockName) { if (!memcmp(lpBlockName, ART_BLOCK_FILENAM, sizeof(ART_BLOCK_NAME)) { nErrcount = ART_mark_block_query(hIGear, hMarkIndex, &lpBlockName, (LPVOID)szFileName, &dwBlockSize); if (!strcmp(szFileName, "Clown.tif")) { nErrcount = RT_mark_send_to_back(hIGear, hMarkIndex); } } nErrcount = ART_mark_block_next(hIGear, hMarkIndex, &lpBlockName); } |
The block data for the named block retrieved by calling ART_mark_block_query(). ART_mark_block_next() is called to get the name of the next named block. If there are no blocks, ART_mark_block_first() sets lpBlockName to zero.
An error is set if any of the following conditions are met: