ImageGear Professional DLL v18.1 for Windows
ART_mark_create
Send Feedback
ImageGear Professional v18.1 > API Reference Guide > ART Component API Reference > ART Component Functions Reference > Mark Management Functions > ART_mark_create

Glossary Item Box

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:

Name Type Description
hIGear HIGEAR HIGEAR handle to the image.
lpMarkAttr const LPART_MARK_ATTRIBUTES Mark Description.
lpMarkIndex LPART_MARK_INDEX 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 */
ART_MARK_ATTRIBUTES ma;  /* attributes structure */
ART_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:

©2014. Accusoft Corporation. All Rights Reserved.