PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK

  • Finding out the display mode and the alignment mode of an image (syntax 1)
  • Limits
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
..ImageMode is used to find out and modify:
  • the display mode of an image,
  • Versions 18 and later
    the alignment of image,
    New in version 18
    the alignment of image,
    the alignment of image,
  • Versions 18 and later
    the HQ mode of image.
    New in version 18
    the 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 later
    for a Button control.
    New in version 22
    for a Button control.
    for a Button control.
Note: The display mode of an image is defined in the window editor or in the page editor in the control description ("General" tab).
Some examples:
Normal image
Normal image
Centered image
Centered image
Stretched image
Stretched image
Homothetic centered image
Homothetic centered image
Tiled image
Tiled image
Example
// Modify the display mode of image found in the "IMG_CarImage" control
IMG_CarImage..ImageMode = imgTiled
Versions 18 and later
// Modify the display mode and the alignment mode of image found in "IMG_CarImage"
IMG_CarImage..ImageMode = imgNormal + imgAlignVBottom
New in version 18
// Modify the display mode and the alignment mode of image found in "IMG_CarImage"
IMG_CarImage..ImageMode = imgNormal + imgAlignVBottom
// Modify the display mode and the alignment mode of image found in "IMG_CarImage"
IMG_CarImage..ImageMode = imgNormal + imgAlignVBottom
Versions 21 and later
// Management of large fonts: the image is not enlarged because a drawing will be performed
IMG_CarImage..ImageMode = IMG_CarImage..ImageMode + imgNoScale
New in version 21
// Management of large fonts: the image is not enlarged because a drawing will be performed
IMG_CarImage..ImageMode = IMG_CarImage..ImageMode + imgNoScale
// Management of large fonts: the image is not enlarged because a drawing will be performed
IMG_CarImage..ImageMode = IMG_CarImage..ImageMode + imgNoScale
Syntax

Finding out the display mode and the alignment mode of an image Hide the details

<Current mode> = <Control name>..ImageMode
<Current mode>: Integer constant (or combination of constants)
  • Current display mode of image:
    imgCenteredCentered: Image centered in the control.
    imgStretchedStretched: Image stretched across the entire surface of control.
    imgHHomothetic: Image enlarged or reduced (while respecting the proportions of initial image) to occupy the entire surface of control.
    imgHCHomothetic centered: Image enlarged or reduced (while respecting the proportions of initial image) to occupy the entire surface of control and centered in the control.
    imgHEHomothetic extended: Image enlarged or reduced (while respecting the proportions of initial image) so that the smaller side of image is entirely displayed in the control.
    imgHCEHomothetic centered extended: Image enlarged or reduced (while respecting the proportions of the initial image) in order for the smaller side of the image to be entirely displayed in the control and in order for the image to be centered in the control.
    imgHWISHomothetic without enlargement: If the image can be entirely displayed in the control, it is displayed at 100%. Otherwise, the image is proportionally reduced in order to be entirely displayed.
    imgHCWISHomothetic without enlargement: If the image can be entirely displayed in the control, it is displayed at 100% and centered in the control. Otherwise, the image is proportionally reduced in order to be entirely displayed and centered in the control.
    imgTiledTiled: Image displayed at 100% and tiled to occupy the entire surface of control (tile).
    imgNormal100%: Image displayed at 100% in the top left corner of control.
Versions 18 and later
  • Alignment mode of the image:
    Versions 18 and later
    imgAlignHCentered
    New in version 18
    imgAlignHCentered
    imgAlignHCentered
    Horizontally centered.
    Java This constant is not available.
    Versions 18 and later
    imgAlignVBottom
    New in version 18
    imgAlignVBottom
    imgAlignVBottom
    Bottom vertical alignment.
    Java This constant is not available.
    Versions 18 and later
    imgAlignVCentered
    New in version 18
    imgAlignVCentered
    imgAlignVCentered
    Vertically centered.
    Java This constant is not available.
    Versions 18 and later
    imgAlignHRight
    New in version 18
    imgAlignHRight
    imgAlignHRight
    Horizontal alignment to right.
    Java This constant is not available.
New in version 18
  • Alignment mode of the image:
    Versions 18 and later
    imgAlignHCentered
    New in version 18
    imgAlignHCentered
    imgAlignHCentered
    Horizontally centered.
    Java This constant is not available.
    Versions 18 and later
    imgAlignVBottom
    New in version 18
    imgAlignVBottom
    imgAlignVBottom
    Bottom vertical alignment.
    Java This constant is not available.
    Versions 18 and later
    imgAlignVCentered
    New in version 18
    imgAlignVCentered
    imgAlignVCentered
    Vertically centered.
    Java This constant is not available.
    Versions 18 and later
    imgAlignHRight
    New in version 18
    imgAlignHRight
    imgAlignHRight
    Horizontal alignment to right.
    Java This constant is not available.
  • Alignment mode of the image:
    Versions 18 and later
    imgAlignHCentered
    New in version 18
    imgAlignHCentered
    imgAlignHCentered
    Horizontally centered.
    Java This constant is not available.
    Versions 18 and later
    imgAlignVBottom
    New in version 18
    imgAlignVBottom
    imgAlignVBottom
    Bottom vertical alignment.
    Java This constant is not available.
    Versions 18 and later
    imgAlignVCentered
    New in version 18
    imgAlignVCentered
    imgAlignVCentered
    Vertically centered.
    Java This constant is not available.
    Versions 18 and later
    imgAlignHRight
    New in version 18
    imgAlignHRight
    imgAlignHRight
    Horizontal alignment to right.
    Java This constant is not available.
Versions 18 and later
  • Management of image quality:
    Versions 18 and later
    imgHQ
    New in version 18
    imgHQ
    imgHQ
    In homothetic mode, used to improve the quality of image when this one is reduced in relation to its initial size.
    Java This constant is not available.
New in version 18
  • Management of image quality:
    Versions 18 and later
    imgHQ
    New in version 18
    imgHQ
    imgHQ
    In homothetic mode, used to improve the quality of image when this one is reduced in relation to its initial size.
    Java This constant is not available.
  • Management of image quality:
    Versions 18 and later
    imgHQ
    New in version 18
    imgHQ
    imgHQ
    In homothetic mode, used to improve the quality of image when this one is reduced in relation to its initial size.
    Java This constant is not available.
Versions 21 and later
  • Management of large fonts:
    Versions 21 and later
    imgNoScale
    New in version 21
    imgNoScale
    imgNoScale
    In "Large fonts" mode of Windows, the image displayed in an Image control is automatically zoomed.
    The imgNoScale constant allows you not to zoom the image in "Large fonts" mode. This constant is useful for the controls where a drawing is performed on a bitmap image coming from a screen shot.
    This constant must be combined with one of the constants used to define the display mode of image.
    Java This constant is not available.
New in version 21
  • Management of large fonts:
    Versions 21 and later
    imgNoScale
    New in version 21
    imgNoScale
    imgNoScale
    In "Large fonts" mode of Windows, the image displayed in an Image control is automatically zoomed.
    The imgNoScale constant allows you not to zoom the image in "Large fonts" mode. This constant is useful for the controls where a drawing is performed on a bitmap image coming from a screen shot.
    This constant must be combined with one of the constants used to define the display mode of image.
    Java This constant is not available.
  • Management of large fonts:
    Versions 21 and later
    imgNoScale
    New in version 21
    imgNoScale
    imgNoScale
    In "Large fonts" mode of Windows, the image displayed in an Image control is automatically zoomed.
    The imgNoScale constant allows you not to zoom the image in "Large fonts" mode. This constant is useful for the controls where a drawing is performed on a bitmap image coming from a screen shot.
    This constant must be combined with one of the constants used to define the display mode of image.
    Java This constant is not available.
<Control name>: Character string (with or without quotes)
Name of control to use.

Modifying the display mode and the alignment mode of an image Hide the details

<Control name>..ImageMode = <New mode>
<Control name>: Character string (with or without quotes)
Name of control to use.
<New mode>: Integer constant
  • New display mode for the image:
    imgCenteredCentered: Image centered in the control.
    imgStretchedStretched: Image stretched across the entire surface of control.
    imgHHomothetic: Image enlarged or reduced (while respecting the proportions of initial image) to occupy the entire surface of control.
    imgHCHomothetic centered: Image enlarged or reduced (while respecting the proportions of initial image) to occupy the entire surface of control and centered in the control.
    imgHEHomothetic extended: Image enlarged or reduced (while respecting the proportions of initial image) so that the smaller side of image is entirely displayed in the control.
    imgHCEHomothetic centered extended: Image enlarged or reduced (while respecting the proportions of the initial image) in order for the smaller side of the image to be entirely displayed in the control and in order for the image to be centered in the control.
    imgHWISHomothetic without enlargement: If the image can be entirely displayed in the control, it is displayed at 100%. Otherwise, the image is proportionally reduced in order to be entirely displayed.
    imgHCWISHomothetic without enlargement: If the image can be entirely displayed in the control, it is displayed at 100% and centered in the control. Otherwise, the image is proportionally reduced in order to be entirely displayed and centered in the control.
    imgTiledTiled: Image displayed at 100% and tiled to occupy the entire surface of control (tile).
    imgNormal100%: Image displayed at 100% in the top left corner of control.
Versions 18 and later
  • Alignment mode of the image:
    Versions 18 and later
    imgAlignHCentered
    New in version 18
    imgAlignHCentered
    imgAlignHCentered
    Horizontally centered.
    Java This constant is not available.
    Versions 18 and later
    imgAlignVBottom
    New in version 18
    imgAlignVBottom
    imgAlignVBottom
    Bottom vertical alignment.
    Java This constant is not available.
    Versions 18 and later
    imgAlignVCentered
    New in version 18
    imgAlignVCentered
    imgAlignVCentered
    Vertically centered.
    Java This constant is not available.
    Versions 18 and later
    imgAlignHRight
    New in version 18
    imgAlignHRight
    imgAlignHRight
    Horizontal alignment to right.
    Java This constant is not available.
New in version 18
  • Alignment mode of the image:
    Versions 18 and later
    imgAlignHCentered
    New in version 18
    imgAlignHCentered
    imgAlignHCentered
    Horizontally centered.
    Java This constant is not available.
    Versions 18 and later
    imgAlignVBottom
    New in version 18
    imgAlignVBottom
    imgAlignVBottom
    Bottom vertical alignment.
    Java This constant is not available.
    Versions 18 and later
    imgAlignVCentered
    New in version 18
    imgAlignVCentered
    imgAlignVCentered
    Vertically centered.
    Java This constant is not available.
    Versions 18 and later
    imgAlignHRight
    New in version 18
    imgAlignHRight
    imgAlignHRight
    Horizontal alignment to right.
    Java This constant is not available.
  • Alignment mode of the image:
    Versions 18 and later
    imgAlignHCentered
    New in version 18
    imgAlignHCentered
    imgAlignHCentered
    Horizontally centered.
    Java This constant is not available.
    Versions 18 and later
    imgAlignVBottom
    New in version 18
    imgAlignVBottom
    imgAlignVBottom
    Bottom vertical alignment.
    Java This constant is not available.
    Versions 18 and later
    imgAlignVCentered
    New in version 18
    imgAlignVCentered
    imgAlignVCentered
    Vertically centered.
    Java This constant is not available.
    Versions 18 and later
    imgAlignHRight
    New in version 18
    imgAlignHRight
    imgAlignHRight
    Horizontal alignment to right.
    Java This constant is not available.
Versions 18 and later
  • Management of image quality:
    Versions 18 and later
    imgHQ
    New in version 18
    imgHQ
    imgHQ
    In homothetic mode, used to improve the quality of image when this one is reduced in relation to its initial size.
    Java This constant is not available.
New in version 18
  • Management of image quality:
    Versions 18 and later
    imgHQ
    New in version 18
    imgHQ
    imgHQ
    In homothetic mode, used to improve the quality of image when this one is reduced in relation to its initial size.
    Java This constant is not available.
  • Management of image quality:
    Versions 18 and later
    imgHQ
    New in version 18
    imgHQ
    imgHQ
    In homothetic mode, used to improve the quality of image when this one is reduced in relation to its initial size.
    Java This constant is not available.
Versions 21 and later
  • Management of large fonts:
    Versions 21 and later
    imgNoScale
    New in version 21
    imgNoScale
    imgNoScale
    In "Large fonts" mode of Windows, the image displayed in an Image control is automatically zoomed.
    The imgNoScale constant allows you not to zoom the image in "Large fonts" mode. This constant is useful for the controls where a drawing is performed on a bitmap image coming from a screen shot.
    This constant must be combined with one of the constants used to define the display mode of image.
    Java This constant is not available.
New in version 21
  • Management of large fonts:
    Versions 21 and later
    imgNoScale
    New in version 21
    imgNoScale
    imgNoScale
    In "Large fonts" mode of Windows, the image displayed in an Image control is automatically zoomed.
    The imgNoScale constant allows you not to zoom the image in "Large fonts" mode. This constant is useful for the controls where a drawing is performed on a bitmap image coming from a screen shot.
    This constant must be combined with one of the constants used to define the display mode of image.
    Java This constant is not available.
  • Management of large fonts:
    Versions 21 and later
    imgNoScale
    New in version 21
    imgNoScale
    imgNoScale
    In "Large fonts" mode of Windows, the image displayed in an Image control is automatically zoomed.
    The imgNoScale constant allows you not to zoom the image in "Large fonts" mode. This constant is useful for the controls where a drawing is performed on a bitmap image coming from a screen shot.
    This constant must be combined with one of the constants used to define the display mode of image.
    Java This constant is not available.
Remarks

Finding out the display mode and the alignment mode of an image (syntax 1)

..ImageMode returns a single value representing both the display mode of the image 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

..ImageMode only applies to:
  • the Image controls,
  • the Image columns found in the Table controls,
  • the Chart controls found in the windows,
  • Versions 22 and later
    the Button controls.
    New in version 22
    the Button controls.
    the Button controls.
Java ..ImageMode only applies to the Image controls.
Java If the display mode is modified by programming, the content of the image must be re-assigned to view the changes.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment