This function creates a new mark.
Declaration:
Copy Code | |
---|---|
AT_ERRCOUNT ART_mark_create(
HIGEAR hIGear,
const LPART_MARK_ATTRIBUTES lpMarkAttr,
LPART_MARK_INDEX lpMarkIndex
);
|
Arguments:
hIGear | HIGEAR handle to the image. |
lpMarkAttr | Mark Description. |
lpMarkIndex | Mark Identifier. |
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 */ AT_MARK_ATTRIBUTES ma; /* attributes structure */ AT_MARK_INDEX hMarkIndex; /* index to the mark just */ /* created */ /* set the mark type */ ma.dwType = ART_MARK_TEXT_STAMP; /* set the mark color */ ma.rgbColor1.rgbRed = 0xFF; /* set the mark to be visible */ ma.bVisible = TRUE; /* create the mark */ nErrcount = ART_mark_create(hIGear, &ma, &hMarkIndex); if (nErrcount != 0) { ErrorReport(hWnd); } else { ART_GUI_mark_paint(hIGear, IG_GRP_DEFAULT, hMarkIndex, hWnd, TRUE); } |
Remarks:
Marks are initially created with two reserved named blocks: index and group. The index block is assigned a unique number, starting at 0. The index is taken from the global index block, then the global index block is incremented by one. The group is taken from the global group block. The following marks require additional named blocks to be created: lines, images, arrows, buttons, audio and text.
Returned in lpMarkIndex is the value stored in the index named block. The fields in the lpMarkAttr parameter set the attributes of the new mark, and are filled with default values. Call ART_mark_modify() to modify the attributes of the mark.
If the dwTime field is set to 0, the library is set to the current time. Not all fields are used for each mark type. An error is set if any of the following conditions are met:
- hIGear does not reference a valid ImageGear handle.
- lpMarkAttr is an invalid address or has one or more invalid fields.
- The memory pointed to by lpMarkIndex is read-only, invalid or not large enough.