- Finding out the display mode and the alignment mode of an image (syntax 1)
- Limits
ImageMode (Property) In french: ImageMode
The Property ImageMode allows to know and modify: - the display mode of an image,
Versions 18 and laterthe alignment of image, New in version 18the alignment of image, the alignment of image, Versions 18 and laterthe HQ mode of image. New in version 18the HQ mode of image. the HQ mode of image.
This property can be used: - for an Image control,
- for an Image table column,
- for the background of a Chart control found in a window,
Versions 22 and laterfor a Button control. New in version 22for a Button control. for a Button control.
Some examples: | | | Normal image | Centered image | Stretched image | Homothetic centered image | Tiled image | |
// Modify the display mode of image found in the "IMG_CarImage" control IMG_ImageCar.ImageMode = imgTiled
Versions 18 and later
// Modify the display mode and the alignment mode of image found in "IMG_CarImage" IMG_ImageCar.ImageMode = imgNormal + imgAlignVBottom
New in version 18
// Modify the display mode and the alignment mode of image found in "IMG_CarImage" IMG_ImageCar.ImageMode = imgNormal + imgAlignVBottom
// Modify the display mode and the alignment mode of image found in "IMG_CarImage" IMG_ImageCar.ImageMode = imgNormal + imgAlignVBottom
Versions 21 and later
// Management of large fonts: the image is not enlarged because a drawing will be performed IMG_ImageCar.ImageMode = IMG_ImageCar.ImageMode + imgNoScale
New in version 21
// Management of large fonts: the image is not enlarged because a drawing will be performed IMG_ImageCar.ImageMode = IMG_ImageCar.ImageMode + imgNoScale
// Management of large fonts: the image is not enlarged because a drawing will be performed IMG_ImageCar.ImageMode = IMG_ImageCar.ImageMode + imgNoScale
Syntax
Finding out the display mode and the alignment mode of an image Hide the details
<Current mode> = <Control used>.ImageMode
Modifying the display mode and the alignment mode of an image Hide the details
<Control used>.ImageMode = <New mode>
Remarks Finding out the display mode and the alignment mode of an image (syntax 1) The Property ImageMode returns a single value representing both the Image display mode and the alignment mode.. To separate the alignment information from the display information, a binary filter must be applied in order to subtract the display mask or the alignment mask from the result ( BinaryAND). Tip: To only retrieve the value corresponding to the alignment mode, apply a binary mask whose value is the reunion of all alignment constants. The remaining constant will be the alignment constant used in the image. For example:
CurrentMode is int MaskAlignmentMode is int AlignmentMode is int CurrentMode = IMG_Photo.ImageMode MaskAlignmentMode = imgAlignHCentered + imgAlignHRight + imgAlignVBottom + imgAlignVCentered AlignmentMode = BinaryAND(CurrentMode, MaskAlignmentMode) Info(AlignmentMode)
Limits The Property ImageMode applies only: - the Image controls,
- the Image columns found in the Table controls,
- the Chart controls found in the windows,
Versions 22 and laterthe Button controls. New in version 22the Button controls. the Button controls.
This page is also available for…
|
|
|