SurfaceTexture.GetTransformMatrix(Single[]) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Retrieve the 4x4 texture coordinate transform matrix associated with the texture image set by
the most recent call to #updateTexImage
.
[Android.Runtime.Register("getTransformMatrix", "([F)V", "GetGetTransformMatrix_arrayFHandler")]
public virtual void GetTransformMatrix (float[]? mtx);
[<Android.Runtime.Register("getTransformMatrix", "([F)V", "GetGetTransformMatrix_arrayFHandler")>]
abstract member GetTransformMatrix : single[] -> unit
override this.GetTransformMatrix : single[] -> unit
Parameters
- mtx
- Single[]
the array into which the 4x4 matrix will be stored. The array must have exactly 16 elements.
- Attributes
Remarks
Retrieve the 4x4 texture coordinate transform matrix associated with the texture image set by the most recent call to #updateTexImage
.
This transform matrix maps 2D homogeneous texture coordinates of the form (s, t, 0, 1) with s and t in the inclusive range [0, 1] to the texture coordinate that should be used to sample that location from the texture. Sampling the texture outside of the range of this transform is undefined.
The matrix is stored in column-major order so that it may be passed directly to OpenGL ES via the glLoadMatrixf
or glUniformMatrix4fv
functions.
If the underlying buffer has a crop associated with it, the transformation will also include a slight scale to cut off a 1-texel border around the edge of the crop. This ensures that when the texture is bilinear sampled that no texels outside of the buffer's valid region are accessed by the GPU, avoiding any sampling artifacts when scaling.
Java documentation for android.graphics.SurfaceTexture.getTransformMatrix(float[])
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.