ImageGear for C and C++ on Windows v19.7 - Updated
IG_dspl_antialias_set_ex
API Reference Guide > Core Component API Reference > Core Component Functions Reference > Display Functions > IG_dspl_antialias_set_ex

This function sets new anti-alias settings.

Declaration:

 
Copy Code
AT_ERRCOUNT  ACCUAPI  IG_dspl_antialias_set_ex(
        [IN] HIGEAR hIGear,
        [IN] DWORD dwGrpID,
        [IN] AT_MODE nAliasFlags,
        [IN] INT Threshold,
        [IN] INT nColorQuality 
);

Arguments:

Name Type Description
hIGear HIGEAR ImageGear handle of image.
dwGrpID DWORD Identifier of group in which to set option.
nAliasFlags AT_MODE New value of AliasMode to set. It is an OR combination of following elements:
  • Scale-Up interpolation (re-sampling)
  • Scale-Down interpolation (anti-aliasing)
For 1 bit images anti-aliasing element is a one of constants:
  • IG_DSPL_ANTIALIAS_NONE
  • IG_DSPL_ANTIALIAS_SCALE_TO_GRAY
  • IG_DSPL_ANTIALIAS_PRESERVE_BLACK
  • IG_DSPL_ANTIALIAS_PRESERVE_WHITE

with OR combination of one additional flag IG_DSPL_ANTIALIAS_SUBSAMPLE

Anti-aliasing for all non-1 bit color spaces is activated with the IG_DSPL_ANTIALIAS_COLOR flag. Scale-Up interpolation for all non-1 bit color spaces is specified by the IG_DSPL_ANTIALIAS_RESAMPLE_BILINE flag.

nThreshold INT It indicates the threshold value of the amount of selected color to include for IG_DSPL_ANTIALIAS_PRESERVE_XXXX scale-down interpolations. Please see Dithering, Anti-Aliasing, and Palette Handling.
nColorQuality INT Specifies quality of color scale-down interpolation (anti-aliasing). Valid values are from 0 to 100 and specify the percent of image pixels taken into account to produce one display pixel. Zero value means automatic quality choice according with image resolution and display settings.

Return Value:

Returns the number of ImageGear errors that occurred during this function call.

Supported Raster Image Formats:

All pixel formats supported by ImageGear for C and C++.

Sample:

None

Example:

 
Copy Code
HIGEAR           hIGear;     /* HIGEAR handle of image  */ 
DWORD           nGrpID;     /* display group identifier */
 ...
/* sets scale to gray algorithm with subsampling  */
IG_dspl_antialias_set_ex( hIGear, nGrpID, IG_DSPL_ANTIALIAS_SCALE_TO_GRAY|
IG_DSPL_ANTIALIAS_SUBSAMPLE, 50, 80);
 ...