StretchMode Enum
Specifies how an image size is calculated and how it is stretched.
Location
- Namespace
- Fuse.Elements
- Package
- Fuse.Elements 2.9.1
Possible Values
- PointPrecise
-
The size of the source image, in points calculated with density, are used as the image size. This is the default: a 100x50 source image will be 100x50 points in size. This preserves size across various device densities.
- PixelPrecise
-
The size is pixel matched to the source so the image is drawn 1:1. This means the visual size changes across device densities, but the image remains sharp.
- PointPrefer
-
If the size of the image in
PixelPrecise
mode is close toPointPrecise
then usePixelPrecise
mode, otherwise usePointPrecise
mode. This retains sharpness with slightly varying sizes, but prevents too much size variation. - Fill
-
The image is stretched to fill the available space. The aspect ratio is not retained.
- Scale9
-
The image is stretched in 9-segments defined by the
Scale9Margin
. Corners are not stretched, borders are stretced in one direction, the center is stretched in both directions. - Uniform
-
Stretches the image to touch the sides of the available space and retain the aspect ratio. This will result in unfilled sections on either the left/right or top/bottom sides of the image.
- UniformToFill
-
Stretches an image to touch all sides of the available space and retain the aspect ratio. This will result in the image being clipped on the left/right or top/bottom.
Interface of StretchMode
Fill : StretchMode uno
The image is stretched to fill the available space. The aspect ratio is not retained.
HasFlag(StretchMode) : bool uno
PixelPrecise : StretchMode uno
The size is pixel matched to the source so the image is drawn 1:1. This means the visual size changes across device densities, but the image remains sharp.
PointPrecise : StretchMode uno
The size of the source image, in points calculated with density, are used as the image size. This is the default: a 100x50 source image will be 100x50 points in size. This preserves size across various device densities.
PointPrefer : StretchMode uno
If the size of the image in PixelPrecise
mode is close to PointPrecise
then use PixelPrecise
mode, otherwise use PointPrecise
mode. This retains sharpness with slightly varying sizes, but prevents too much size variation.
Scale9 : StretchMode uno
The image is stretched in 9-segments defined by the Scale9Margin
. Corners are not stretched, borders are stretced in one direction, the center is stretched in both directions.
StretchMode - StretchMode : StretchMode uno
StretchMode != StretchMode : bool uno
StretchMode & StretchMode : StretchMode uno
StretchMode ^ StretchMode : StretchMode uno
StretchMode == StretchMode : bool uno
StretchMode | StretchMode : StretchMode uno
Uniform : StretchMode uno
Stretches the image to touch the sides of the available space and retain the aspect ratio. This will result in unfilled sections on either the left/right or top/bottom sides of the image.
UniformToFill : StretchMode uno
Stretches an image to touch all sides of the available space and retain the aspect ratio. This will result in the image being clipped on the left/right or top/bottom.