GestureUtils.SpatialSampling 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.
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
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
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.
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.