IdxSourceDPI.GetSourceDPI Method
Returns the monitor DPI value for which the stored image is designed.
Declaration
function GetSourceDPI: Integer;
Returns
Type |
---|
Integer |
Remarks
All DevExpress controls use the image source DPI value to calculate the on-screen image dimensions (in pixels) in a running application, depending on the current screen DPI. The resulting on-screen image width and height are calculated by multiplying the image’s original width and height values by the ratio between the monitor DPI and the value returned by the GetSourceDPI
function.
The dxGetImageSourceDPI function calls the GetSourceDPI
function internally for the specified image list or container.
To avoid the automatic on-screen image size scaling, return the source DPI value matching the current monitor DPI in your implementation of the GetSourceDPI
function in a TGraphic or TCustomImageList class descendant.
Note
A value returned by the GetSourceDPI
function, must be within the range whose lower and upper bounds are determined by the dxMinDPI and dxMaxDPI global constants, respectively. Call the dxCheckDPIValue function to clamp the returned value within the supported DPI interval.