Delphi
TImageWrapMode = (
Original,
Fit,
Stretch,
Tile,
Center,
Place
);
C++
enum class DECLSPEC_DENUM TImageWrapMode : unsigned char { Original, Fit, Stretch, Tile, Center, Place };
Properties
Description
Specifies whether and how to resize, replicate, and position the image for rendering the control surface.
The TImageWrapMode type defines the following constants:
Constant
|
Illustration
|
Meaning
|
Original
|
|
Display the image with its original dimensions:
- The image is placed in the upper-left corner of the rectangle of the control.
- If the image is larger than the control's rectangle, then only the upper-left part of the image, which fits in the rectangle of the control, is shown. The image is not resized.
|
Fit
|
|
Best fit the image in the rectangle of the control:
- If any dimension of the image is larger than the rectangle of the control, then scales down the image (keeping image proportions – the ratio between the width and height) to fit the whole image in the rectangle of the control. That is, either the width of the resized image is equal to the width of the control's rectangle or the height of the resized image is equal to the height of the rectangle of the control. The whole image should be displayed. The image is displayed centered in the rectangle of the control.
- If the original image is smaller than the rectangle of the control, then the image is stretched to best fit in the rectangle of the control. Whole the image should be displayed. The image is displayed centered in the rectangle of the control.
|
Stretch
|
|
Stretch the image to fill the entire rectangle of the control.
|
Tile
|
|
Tile (multiply) the image to cover the entire rectangle of the control:
- If the image is larger than the rectangle of the control, then only the upper-left part of the image, which fits in the rectangle of the control, is shown. The image is not resized.
- If the image (original size) is smaller than the rectangle of the control, then the multiple images are tiled (placed one next to another) to fill the entire rectangle of the control. The images are placed beginning from the upper-left corner of the rectangle of the control.
|
Center
|
|
Center the image to the rectangle of the control:
- The image is always displayed at its original size (regardless whether the rectangle of the control is larger or smaller than the image size).
|
Place
|
|
Fit the image in the rectangle of the control:
- If any dimension of the image is larger than the rectangle of the control, then scales down the image (keeping image proportions--the ratio between the width and height) to fit the whole image in the rectangle of the control. That is, either the width of the resized image is equal to the width of the control's rectangle or the height of the resized image is equal to the height of the control's rectangle. Whole the image should be displayed. The image is displayed centered in the rectangle of the control.
- If the original image is smaller than the rectangle of the control, then the image is not resized. The image is displayed centered in the rectangle of the control.
|
See Also