This function allows you to set the current display option settings for either a specific HIGEAR image or to set the settings that will be inherited by each new HIGEAR image.
Declaration:
Copy Code | |
---|---|
AT_ERRCOUNT ACCUAPI IG_display_option_set (
HIGEAR hIGear,
AT_MODE nOption,
const LPVOID lpOption,
LPVOID lpReserved
);
|
Arguments:
Name | Type | Description |
hIGear | HIGEAR | HIGEAR handle of image or NULL. |
nOption | AT_MODE | A integer of type AT_MODE that tells ImageGear which display option to set. The options are defined in accucnst.h and their names begin with IG_DISPLAY_OPTION_. |
lpOption | const LPVOID | A long pointer to VOID display option data. See details below. |
lpReserved | LPVOID | This argument is reserved for future use. Please set to NULL for now. |
Return Value:
Returns the number of ImageGear errors that occurred during this function call. If there are no errors, the return value is IGE_SUCCESS.
Supported Raster Image Formats:
This function does not process image pixels.
Sample:
None
Example:
Copy Code | |
---|---|
HIGEAR hIGear; /* HIGEAR handle of image */
IG_display_option_set( hIGear, IG_DISPLAY_OPTION_DOWNSHIFT, (LPVOID)0, NULL);
|
Remarks:
You may set these options for a specific HIGEAR or for all newly created HIGEAR images. To set the options for a particular HIGEAR image, set hIGear to the appropriate handle. To set the options for all newly created HIGEAR images, set hIGear to NULL.
nOption must be set to one of the IG_DISPLAY_OPTION_ constants defined in accucnst.h. lpOption should be set to the value of the option. This will vary depending on what option you are setting. See the list below.
Currently, this function is useful for 16-bit grayscale images only. However, constants will be added to support all bit depths. See accucnst.h for new constants beginning with IG_DISPLAY_OPTION_. |
Currently available options include:
- IG_DISPLAY_OPTION_DOWNSHIFT: This option is for 16-bit grayscale DIBs only. It has no effect on any other image bit depth. The value passed in to nOption must be in the range of 0 to 16 (the value is cast to a LPVOID - the address of this value is not passed in). This value specifies how far each 16-bit pixel should be downshifted before the least significant word is taken for display. All remaining bits in the high word are discarded. Setting this option turns off the IG_DISPLAY_OPTION_LUT option.
- IG_DISPLAY_OPTION_LUT: This option is for 16-bit grayscale DIBs only. It has no effect on any other image bit depth. The value passed in to nOption must be a pointer to a 16x8 LUT (64K of memory). This table should be filled with values that allow ImageGear to display 16-bit grayscale pixels on a 8-bit display. Setting this option turns off the IG_DISPLAY_OPTION_DOWNSHIFT option.
Additional options include:
- IG_DISPLAY_OPTION_OFFSCREEN_DRAW: If this parameter is TRUE then the display code optimizes the drawing when the ART component is used to prevent flashing. This a bit slower, but the visual quality is better. Otherwise, each redraw operation is directly displayed, with flashing possible.
- IG_DISPLAY_OPTION_DDB_OPTIMIZE: If this parameter is TRUE then monochrome DDB is created from 1bpp HIGEAR image. Otherwise, a compatible bitmap to the current display is created.
- IG_DISPLAY_OPTION_OFFSCREEN_WIDTH/IG_DISPLAY_OPTION_OFFSCREEN_HEIGHT: Default values (0, 0) means that GetDeviceCaps(hDC,HORZRES) / GetDeviceCaps(hDC,VERTRES) will be used, respectively. These options specify the size of offscreen drawing surface. Set it to the size of a single monitor. In case of a dual monitor system you need to set IG_DISPLAY_OPTION_OFFSCREEN_WIDTH / IG_DISPLAY_OPTION_OFFSCREEN_HEIGHT to the total size of your dual monitor screen.