StretchMode
EnumOptions for stretching a mesh to fit a ScreenTransform Used in RenderMeshVisual stretchMode property, as long as the SceneObject has a ScreenTransform attached.
- Available on all platforms
Options for stretching a mesh to fit a ScreenTransform
Used in RenderMeshVisual stretchMode property, as long as the SceneObject has a ScreenTransform attached.
Also used in TextFill
See the Image guide for more information about stretch modes.
Index
Example
// @input Component.Image image
script.image.stretchMode = StretchMode.Stretch;
Enumeration Members
Fill
Fill:
number
Scale uniformly so that both width and height meet or exceed the bounds.
FillAndCut
FillAndCut:
number
Same as Fill, but when used with the Image any area outside of the bounds is cropped out.
Fit
Fit:
number
Scale uniformly so that both width and height fit within the bounds.
FitHeight
FitHeight:
number
Scale uniformly to match the same height as the bounds.
FitWidth
FitWidth:
number
Scale uniformly to match the same width as the bounds.
Stretch
Stretch:
number
Scale non-uniformly to match the exact width and height of the bounds.