ImageGear Professional DLL v17.1 for Windows Accusoft
IG_dspl_layout_get
Send Feedback  
ImageGear Professional DLL v17.1 for Windows > API Reference Guide > Core Component API Reference > Core Component Functions Reference > Display Functions > IG_dspl_layout_get

Glossary Item Box

This function returns the current values of layout parameters.

Declaration:

  Copy Code
AT_ERRCOUNT  ACCUAPI  IG_dspl_layout_get( 
        [IN] HIGEAR hIGear, 
        [IN] DWORD dwGrpID,
        [OUT] LPAT_RECTANGLE lpImageRect,
        [OUT] LPAT_RECTANGLE lpDeviceRect,
        [OUT] LPAT_RECTANGLE lpClipRect,
        [OUT] LPAT_MODE lpnFitMode,
        [OUT] LPAT_MODE lpnAlignMode,
        [OUT] LPAT_MODE lpnAspectMode,
        [OUT] LPDOUBLE lpdAspectValue
);

Arguments:

hIGear Image handle from which to search the option group.
dwGrpID Identifier of group which to get layout options.
lpImageRect Pointer to the rectangle in which to copy the value of ImageRect option. If NULL then it is ignored. If ImageRect is not set then an empty rectangle is returned.
lpDeviceRect Pointer to the rectangle in which to copy DeviceRect. If NULL, then the parameter is ignored. If an empty rectangle is returned then it is not set and it will be calculated every time from the destination device.
lpClipRect Pointer to the rectangle in which to copy ClipRect. If NULL, then the parameter is ignored. If an empty rectangle returned then it is not set and it will be calculated every time from the destination device.
lpnFitMode Assigns the current FitMode. If NULL then the parameter is ignored.
lpnAlignMode Assigns the current AlignMode. If NULL then the parameter is ignored.
lpnAspectMode Assigns the current AspectMode. If NULL then the parameter is ignored.
lpdAspectValue Assigns the current AspectValue. If NULL then the parameter is ignored.

Return Value:

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

Supported Raster Image Formats:

All pixel formats supported by ImageGear Professional.

Sample:

ASCII, Display, GUI Windows, Image Processing, MFC, Print, MFC Threads, Vector

Example:

  Copy Code
HIGEAR           hIGear;     /* HIGEAR handle of image  */
DWORD           nGrpID;      /* display group identifier */
AT_RECTANGLE             ImageRect;    /* Image rectangle  */
AT_RECTANGLE            DeviceRect;    /* Device rectangle  */
AT_RECTANGLE             ClipRect;      /* Clip rectangle  */
AT_MODE     nFitMode;               /* Fit mode  */
AT_MODE     nAlignMode;            /* Align mode  */
AT_MODE     nAspectMode;           /* Aspect mode  */
DOUBLE      dAspectValue;    /* Aspect value  */
 ...
/* get all layout parameters */
IG_dspl_layout_get( hIGear, nGrpID, &ImageRect, &DeviceRect, &ClipRect, &nFitMode,
&nAlignMode, &nAspectMode, &dAspectValue );
 ...
/* get only device rectangle and fit mode */
IG_dspl_layout_get( hIGear, nGrpID, NULL, &DeviceRect, NULL, &nFitMode, NULL, NULL, NULL
);
 ...

Remarks:

If a parameter is a rectangle then all empty rectangle is returned if it is not set. For a list of possible values see function IG_dspl_layout_set().

©2012. Accusoft Corporation. All Rights Reserved.