Bitmap.GetScaledWidth 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
GetScaledWidth(Int32) |
Convenience method that returns the width of this bitmap divided by the density scale factor. |
GetScaledWidth(Canvas) |
Convenience for calling |
GetScaledWidth(DisplayMetrics) |
Convenience for calling |
GetScaledWidth(Int32)
Convenience method that returns the width of this bitmap divided by the density scale factor.
[Android.Runtime.Register("getScaledWidth", "(I)I", "")]
public int GetScaledWidth (int targetDensity);
[<Android.Runtime.Register("getScaledWidth", "(I)I", "")>]
member this.GetScaledWidth : int -> int
Parameters
- targetDensity
- Int32
The density of the target canvas of the bitmap.
Returns
The scaled width of this bitmap, according to the density scale factor.
- Attributes
Remarks
Convenience method that returns the width of this bitmap divided by the density scale factor.
Returns the bitmap's width multiplied by the ratio of the target density to the bitmap's source density
Java documentation for android.graphics.Bitmap.getScaledWidth(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
GetScaledWidth(Canvas)
Convenience for calling #getScaledWidth(int)
with the target
density of the given Canvas
.
[Android.Runtime.Register("getScaledWidth", "(Landroid/graphics/Canvas;)I", "")]
public int GetScaledWidth (Android.Graphics.Canvas canvas);
[<Android.Runtime.Register("getScaledWidth", "(Landroid/graphics/Canvas;)I", "")>]
member this.GetScaledWidth : Android.Graphics.Canvas -> int
Parameters
- canvas
- Canvas
Returns
The scaled width of this bitmap, according to the density scale factor.
- Attributes
Remarks
Convenience for calling #getScaledWidth(int)
with the target density of the given Canvas
.
Java documentation for android.graphics.Bitmap.getScaledWidth(android.graphics.Canvas)
.
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
GetScaledWidth(DisplayMetrics)
Convenience for calling #getScaledWidth(int)
with the target
density of the given DisplayMetrics
.
[Android.Runtime.Register("getScaledWidth", "(Landroid/util/DisplayMetrics;)I", "")]
public int GetScaledWidth (Android.Util.DisplayMetrics metrics);
[<Android.Runtime.Register("getScaledWidth", "(Landroid/util/DisplayMetrics;)I", "")>]
member this.GetScaledWidth : Android.Util.DisplayMetrics -> int
Parameters
- metrics
- DisplayMetrics
Returns
The scaled width of this bitmap, according to the density scale factor.
- Attributes
Remarks
Convenience for calling #getScaledWidth(int)
with the target density of the given DisplayMetrics
.
Java documentation for android.graphics.Bitmap.getScaledWidth(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.