TypedValue.ComplexToDimensionPixelOffset(Int32, DisplayMetrics) Method

Definition

Converts a complex data value holding a dimension to its final value as an integer pixel offset.

[Android.Runtime.Register("complexToDimensionPixelOffset", "(ILandroid/util/DisplayMetrics;)I", "")]
public static int ComplexToDimensionPixelOffset (int data, Android.Util.DisplayMetrics? metrics);
[<Android.Runtime.Register("complexToDimensionPixelOffset", "(ILandroid/util/DisplayMetrics;)I", "")>]
static member ComplexToDimensionPixelOffset : int * Android.Util.DisplayMetrics -> int

Parameters

data
Int32

A complex data value holding a unit, magnitude, and mantissa.

metrics
DisplayMetrics

Current display metrics to use in the conversion -- supplies display density and scaling information.

Returns

The number of pixels specified by the data and its desired multiplier and units.

Attributes

Remarks

Converts a complex data value holding a dimension to its final value as an integer pixel offset. This is the same as #complexToDimension, except the raw floating point value is truncated to an integer (pixel) value. The given <var>data</var> must be structured as a #TYPE_DIMENSION.

Java documentation for android.util.TypedValue.complexToDimensionPixelOffset(int, android.util.DisplayMetrics).

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