StretchMode
Lens Studio v2.0.0+
Description
Options for stretching a mesh to fit a ScreenTransform’s bounding box. Used in MeshVisual’s stretchMode
property, as long as the SceneObject has a ScreenTransform attached. Also used in TextFill’s textureStretch
property to control texture stretching when drawing text.
See the Image guide for more information about stretch modes.
Enum Value | Description |
---|---|
StretchMode.Fit |
Scale uniformly so that both width and height fit within the bounds. |
StretchMode.Fill |
Scale uniformly so that both width and height meet or exceed the bounds. |
StretchMode.Stretch |
Scale non-uniformly to match the exact width and height of the bounds. |
StretchMode.FitHeight |
Scale uniformly to match the same height as the bounds. |
StretchMode.FitWidth |
Scale uniformly to match the same width as the bounds. |
StretchMode.FillAndCut |
Same as Fill , but when used with the Image component any area outside of the bounds is cropped out. |
Examples
// @input Component.Image image
script.image.stretchMode = StretchMode.Stretch;
Still Looking for help?
Visit Support