ImageGear for C and C++ on Windows v20.3 - Updated
IG_ARTX_ruler_create
User Guide > How to Work with ... > Annotations > New Annotation API: ArtX > ArtX Annotation Marks > ART 3.0/ART 2.0 Marks > IG_ARTX_ruler_create

IG_ARTX_ruler_create

This function creates a new instance of a ruler annotation (HIG_ARTX_MARK_RULER).

Declaration:

AT_ERRCOUNT ACCUAPI IG_ARTX_ruler_create(
        LPAT_POINT lpPoints,    
        LPAT_ARTX_BORDER pLine,
        LPAT_ARTX_ASPECTRATIO lpAspectRatio,
        AT_INT nStartLineLength,
        AT_INT nEndLineLength,
        AT_INT nPrecision,
        LPSTR lpszLabel,
        LPAT_ARTX_FONT logFont,
        AT_INT nOpacity,
        LPHIG_ARTX_RULER lphMark
);

Arguments:

Name Type Description
lpPoints LPAT_POINT Array of exactly two points that define the length of the ruler:
  • The first point is the start point.
  • the second point is the end point.
pLine LPAT_ARTX_BORDER Pointer to line style.
lpAspectRatio LPAT_ARTX_ASPECTRATIO Pointer to the aspect ratio.
nStartLineLength AT_INT The Length of the start point touch.
nEndLineLength AT_INT The length of the end point touch.
nPrecision AT_INT The number of digits after the decimal point to report for ruler measurements.
lpszLabel LPSTR The text to label ruler measurements.
logFont LPAT_ARTX_FONT Pointer to the ruler font text.
nOpacity AT_INT The annotation opacity. Valid Values are 0 to 255.
lphMark LPHIG_ARTX_RULER Pointer to storage that is overwritten with the new annotation handle.

Return Value:

Returns 0 if successful. Otherwise, returns the number of ImageGear errors that occurred during this function call.

Supported Raster Image Formats:

This function does not process image pixels.

Remarks:

Upon successful completion: - The new annotation handle, lphMark, may be used with functions that accept either HIG_ARTX_MARK or HIG_ARTX_RULER as input. - The caller is responsible for deleting the newly created annotation using IG_ARTX_mark_delete.

Is this page helpful?
Yes No
Thanks for your feedback.