Share via


GestureUtils.SpatialSampling Method

Definition

Overloads

SpatialSampling(Gesture, Int32)

Samples the gesture spatially by rendering the gesture into a 2D grayscale bitmap.

SpatialSampling(Gesture, Int32, Boolean)

Samples the gesture spatially by rendering the gesture into a 2D grayscale bitmap.

SpatialSampling(Gesture, Int32)

Samples the gesture spatially by rendering the gesture into a 2D grayscale bitmap.

[Android.Runtime.Register("spatialSampling", "(Landroid/gesture/Gesture;I)[F", "")]
public static float[]? SpatialSampling (Android.Gestures.Gesture? gesture, int bitmapSize);
[<Android.Runtime.Register("spatialSampling", "(Landroid/gesture/Gesture;I)[F", "")>]
static member SpatialSampling : Android.Gestures.Gesture * int -> single[]

Parameters

gesture
Gesture

the gesture to be sampled

bitmapSize
Int32

the size of the bitmap

Returns

Single[]

a bitmapSize x bitmapSize grayscale bitmap that is represented as a 1D array. The float at index i represents the grayscale value at pixel [i%bitmapSize, i/bitmapSize]

Attributes

Remarks

Samples the gesture spatially by rendering the gesture into a 2D grayscale bitmap. Scales the gesture to fit the size of the bitmap. The scaling does not necessarily keep the aspect ratio of the gesture.

Java documentation for android.gesture.GestureUtils.spatialSampling(android.gesture.Gesture, int).

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.

Applies to

SpatialSampling(Gesture, Int32, Boolean)

Samples the gesture spatially by rendering the gesture into a 2D grayscale bitmap.

[Android.Runtime.Register("spatialSampling", "(Landroid/gesture/Gesture;IZ)[F", "")]
public static float[]? SpatialSampling (Android.Gestures.Gesture? gesture, int bitmapSize, bool keepAspectRatio);
[<Android.Runtime.Register("spatialSampling", "(Landroid/gesture/Gesture;IZ)[F", "")>]
static member SpatialSampling : Android.Gestures.Gesture * int * bool -> single[]

Parameters

gesture
Gesture

the gesture to be sampled

bitmapSize
Int32

the size of the bitmap

keepAspectRatio
Boolean

if the scaling should keep the gesture's aspect ratio

Returns

Single[]

a bitmapSize x bitmapSize grayscale bitmap that is represented as a 1D array. The float at index i represents the grayscale value at pixel [i%bitmapSize, i/bitmapSize]

Attributes

Remarks

Samples the gesture spatially by rendering the gesture into a 2D grayscale bitmap. Scales the gesture to fit the size of the bitmap.

Java documentation for android.gesture.GestureUtils.spatialSampling(android.gesture.Gesture, int, boolean).

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.

Applies to