Skip to main content

dxGetImageSize(TPicture,TdxScaleFactor) Method

Calculates on-screen pixel dimensions for an image within the specified container or list.

Declaration

function dxGetImageSize(APicture: TPicture; AScaleFactor: TdxScaleFactor): TSize;

Parameters

Name Type
APicture TPicture
AScaleFactor TdxScaleFactor

Returns

Type
TSize

Remarks

All overloaded function variants multiply an implicitly or explicitly specified scale factor by the source image’s width and height and return the result dimensions as a TSize value. The dxGetImageSize functions take the image’s source DPI into account if the specified image list or container implements the IdxSourceSize interface.

  1. The AImage and AScaleFactor parameters accept the source image in a TGraphic container and the target scale factor, respectively.

  2. This variant calculates on-screen dimensions that correspond to the system DPI for one of the two specified source images. The AImage, AImageList, and AImageIndex parameters accept an image container, image list, and the source image’s index within the latter, respectively. The function attempts to calculate the second source image’s dimensions only if the AImage container is empty.

  3. Like the previous variant, this function attempts to calculate on-screen dimensions for an image in the first non-empty container. However, the function multiplies the source image dimensions by a target scale factor it accepts as the AScaleFactor parameter rather than by the system scale factor.

  4. The AImageList and AScaleFactor parameters accept an image list and the target scale factor, respectively. This function variant multiplies the image list’s Width and Height property values by the specified scale factor, even if the list is empty.

  5. The APicture and AScaleFactor parameters accept the source image in a TPicture container and the target scale factor, respectively.

  6. The function’s only parameter (APicture) accepts the source image in a TPicture container. Unlike the previous variant, this function multiplies the source image’s width and height by the system scale factor.

Note

The dxGetImageSize functions return cxNullSize if they accept either an empty image container or nil instead of a valid image list.

See Also