FMX.Objects.TImageWrapMode

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

TImageWrapMode = (Original, Fit, Stretch, Tile, Center);

C++

enum class DECLSPEC_DENUM TImageWrapMode : unsigned char { Original, Fit, Stretch, Tile, Center, iwOriginal _DEPRECATED_ATTRIBUTE3("Use TImageWrapMode.Original")  = 0, iwFit _DEPRECATED_ATTRIBUTE3("Use TImageWrapMode.Fit")  = 1, iwStretch _DEPRECATED_ATTRIBUTE3("Use TImageWrapMode.Stretch")  = 2, iwTile _DEPRECATED_ATTRIBUTE3("Use TImageWrapMode.Tile")  = 3, iwCenter _DEPRECATED_ATTRIBUTE3("Use TImageWrapMode.Center")  = 4 };

Properties

Type Visibility Source Unit Parent
enum public
FMX.Objects.pas
FMX.Objects.hpp
FMX.Objects FMX.Objects

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

IwOriginal

IwOriginal

Display the image with its original dimensions:

  • The image is placed in the upper-left corner of the control's rectangle.
  • If the image is larger than the control's rectangle, then only the upper-left part of the image, which fits in the control's rectangle, is shown. The image is not resized.

Fit

IwFit

IwFit

Best fit to (keeping image proportions) the control's rectangle:

  • If any dimension of the image is larger than the control's rectangle, then decrease the image size (keeping image proportions--the ratio between the width and height) to fit all the image in the control's rectangle. That is, either the resized image width is equal to the width of the control's rectangle or the resized image height is equal to the height of the control's rectangle. All the image should be displayed. The image is displayed centered in the control's rectangle.
  • If the original image is smaller than the control's rectangle, then the image is not resized. The image is displayed centered in the control's rectangle.

Stretch

IwStretch

Stretch the image to fill the entire control's rectangle.

Tile

IwTile

IwTile

Tile (multiply) the image to cover the entire control's rectangle:

  • If the image is larger than the control's rectangle, then only the upper-left part of the image, which fits in the control's rectangle, is shown. The image is not resized.
  • If the image (original size) is smaller than the control's rectangle, then the multiple images are tiled (placed one next to another) to fill the entire control's rectangle. The images are placed beginning from the upper-left corner of the control's rectangle.

Center

IwCenter

IwCenter

Center the image to the control's rectangle:

  • The image is always displayed at its original size (regardless whether the control's rectangle is larger or smaller than the image size).

See Also