ImageGear Professional v18.1 > API Reference Guide > Core Component API Reference > Core Component Functions Reference > Display Functions > IG_dspl_transparency_set |
This function sets the transparency options.
Copy Code
|
|
---|---|
AT_ERRCOUNT ACCUAPI IG_dspl_transparency_set( [IN] HIGEAR hIGear, [IN] DWORD dwGrpID, [IN] AT_MODE nTranspMode, [IN] const LPAT_RGB lpTranspColor, [IN] HIGEAR hIMask, [IN] const LPAT_RECTANGLE lpMaskRect, [IN] const LPAT_POINT lpMaskLocation ); |
Name | Type | Description |
hIGear | HIGEAR | ImageGear handle of image. |
dwGrpID | DWORD | Identifier of the group in which to set transparency options. |
nTranspMode | AT_MODE |
New value of TranspMode to set. Possible value may be:
|
lpTranspColor | const LPAT_RGB | New value of TranspColor to set. If NULL, then this parameter is ignored. |
hIMask | HIGEAR | New value of TranspMask option to set. Please note that the image is not deleted and the application code is responsible for removing the old value of this option. |
lpMaskRect | const LPAT_RECTANGLE | New value of MaskRect option to set. If NULL, then this parameter is ignored. An empty rectangle is possible. |
lpMaskLocation | const LPAT_POINT | New value of MaskLocation option to set. If NULL, then this parameter is ignored. |
Returns the number of ImageGear errors that occurred during this function call.
All pixel formats supported by ImageGear Professional.
Copy Code
|
|
---|---|
HIGEAR hIGear; /* HIGEAR handle of image */ DWORD nGrpID; /* display group identifier */ AT_MODE nTranspMode; /* transparency mode */ AT_RGB TranspColor; /* transparency color */ HIGEAR hIMask; /* transparent mask */ ... /* enable transparent color and mask with default mask rectangle and location oriented and scaled with main image */ nTranspMode = IG_DSPL_TRANSPARENCY_COLOR|IG_DSPL_TRANSPARENCY_MASK|IG_DSPL_TRANSPMASK_STRETCH_TO_IMAGE| IG_DSPL_TRANSPMASK_LOCATE_TO_IMAGE; /* set transparent color to white */ TranspColor.r = TranspColor.g = TranspColor.b = 255; IG_dspl_transparency_set( hIGear, nGrpID, nTranspMode, &TranspColor, hIMask, NULL, NULL ); ... |
This function sets the transparency only for image displaying. For saving image with transparency mask use function IG_display_transparent_set(). |