Canvas.DrawBitmap メソッド

定義

オーバーロード

DrawBitmap(Int32[], Int32, Int32, Single, Single, Int32, Int32, Boolean, Paint)
古い.

指定した色の配列をビットマップとして扱い、描画します。

DrawBitmap(Int32[], Int32, Int32, Int32, Int32, Int32, Int32, Boolean, Paint)
古い.

従来バージョンの drawBitmap(int[] colors, .

DrawBitmap(Bitmap, Single, Single, Paint)

現在のマトリックスによって変換された、指定したペイントを使用して、指定したビットマップを左上隅 (x,y) で描画します。

DrawBitmap(Bitmap, Rect, Rect, Paint)

指定したビットマップを描画し、自動的に拡大縮小/変換して、変換先の四角形を塗りつぶします。

DrawBitmap(Bitmap, Matrix, Paint)

指定したマトリックスを使用してビットマップを描画します。

DrawBitmap(Bitmap, Rect, RectF, Paint)

指定したビットマップを描画し、自動的に拡大縮小/変換して、変換先の四角形を塗りつぶします。

DrawBitmap(Int32[], Int32, Int32, Single, Single, Int32, Int32, Boolean, Paint)

注意事項

deprecated

指定した色の配列をビットマップとして扱い、描画します。

[Android.Runtime.Register("drawBitmap", "([IIIFFIIZLandroid/graphics/Paint;)V", "GetDrawBitmap_arrayIIIFFIIZLandroid_graphics_Paint_Handler")]
[System.Obsolete("deprecated")]
public virtual void DrawBitmap (int[] colors, int offset, int stride, float x, float y, int width, int height, bool hasAlpha, Android.Graphics.Paint? paint);
[<Android.Runtime.Register("drawBitmap", "([IIIFFIIZLandroid/graphics/Paint;)V", "GetDrawBitmap_arrayIIIFFIIZLandroid_graphics_Paint_Handler")>]
[<System.Obsolete("deprecated")>]
abstract member DrawBitmap : int[] * int * int * single * single * int * int * bool * Android.Graphics.Paint -> unit
override this.DrawBitmap : int[] * int * int * single * single * int * int * bool * Android.Graphics.Paint -> unit

パラメーター

colors
Int32[]

ビットマップのピクセルを表す色の配列

offset
Int32

最初のピクセルの色の配列へのオフセット

stride
Int32

行間の配列内の色の数 (= width または <= -width である必要があります>)。

x
Single

ビットマップを描画する場所の X 座標

y
Single

ビットマップを描画する場所の Y 座標

width
Int32

ビットマップの幅

height
Int32

ビットマップの高さ

hasAlpha
Boolean

True を指定すると、色のアルファ チャネルに有効な値が含まれます。 false の場合、アルファ バイトは無視されます (ピクセルごとに0xFFと見なされます)。

paint
Paint

null も指定できます。 ビットマップの描画に使用されるペイント

属性

注釈

指定した色の配列をビットマップとして扱い、描画します。 これにより、最初に配列からビットマップを作成してから描画した場合と同じ結果が得られますが、このメソッドでは、色が頻繁に変更される場合により効率的なビットマップ オブジェクトを明示的に作成することは避けられます。

このメンバーは非推奨とされます。 キャンバスでの使用では、 #isHardwareAccelerated() hardware accelerated このメソッドが呼び出されるたびに、カラー バッファーの内容の内部コピーが必要です。 ビットマップを使用すると、このコピーが回避され、アプリケーションでピクセル データの有効期間とコピーをより明示的に制御できるようになります。

android.graphics.Canvas.drawBitmap(int[], int, int, float, float, int, int, boolean, android.graphics.Paint)Java ドキュメント。

このページの一部は、によって作成および共有された作業に基づく変更であり、に記載されている条件に従って使用されます。

適用対象

DrawBitmap(Int32[], Int32, Int32, Int32, Int32, Int32, Int32, Boolean, Paint)

注意事項

deprecated

従来バージョンの drawBitmap(int[] colors, .

[Android.Runtime.Register("drawBitmap", "([IIIIIIIZLandroid/graphics/Paint;)V", "GetDrawBitmap_arrayIIIIIIIZLandroid_graphics_Paint_Handler")]
[System.Obsolete("deprecated")]
public virtual void DrawBitmap (int[] colors, int offset, int stride, int x, int y, int width, int height, bool hasAlpha, Android.Graphics.Paint? paint);
[<Android.Runtime.Register("drawBitmap", "([IIIIIIIZLandroid/graphics/Paint;)V", "GetDrawBitmap_arrayIIIIIIIZLandroid_graphics_Paint_Handler")>]
[<System.Obsolete("deprecated")>]
abstract member DrawBitmap : int[] * int * int * int * int * int * int * bool * Android.Graphics.Paint -> unit
override this.DrawBitmap : int[] * int * int * int * int * int * int * bool * Android.Graphics.Paint -> unit

パラメーター

colors
Int32[]
offset
Int32
stride
Int32
x
Int32
y
Int32
width
Int32
height
Int32
hasAlpha
Boolean
paint
Paint

ビットマップの描画に使用されるペイント (null の場合があります)

属性

注釈

x,y の int を受け取った drawBitmap(int[] colors, ...) のレガシ バージョン

このメンバーは非推奨とされます。 キャンバスでの使用では、 #isHardwareAccelerated() hardware accelerated このメソッドが呼び出されるたびに、カラー バッファーの内容の内部コピーが必要です。 ビットマップを使用すると、このコピーが回避され、アプリケーションでピクセル データの有効期間とコピーをより明示的に制御できるようになります。

android.graphics.Canvas.drawBitmap(int[], int, int, int, int, int, int, boolean, android.graphics.Paint)Java ドキュメント。

このページの一部は、によって作成および共有された作業に基づく変更であり、に記載されている条件に従って使用されます。

適用対象

DrawBitmap(Bitmap, Single, Single, Paint)

現在のマトリックスによって変換された、指定したペイントを使用して、指定したビットマップを左上隅 (x,y) で描画します。

[Android.Runtime.Register("drawBitmap", "(Landroid/graphics/Bitmap;FFLandroid/graphics/Paint;)V", "GetDrawBitmap_Landroid_graphics_Bitmap_FFLandroid_graphics_Paint_Handler")]
public virtual void DrawBitmap (Android.Graphics.Bitmap bitmap, float left, float top, Android.Graphics.Paint? paint);
[<Android.Runtime.Register("drawBitmap", "(Landroid/graphics/Bitmap;FFLandroid/graphics/Paint;)V", "GetDrawBitmap_Landroid_graphics_Bitmap_FFLandroid_graphics_Paint_Handler")>]
abstract member DrawBitmap : Android.Graphics.Bitmap * single * single * Android.Graphics.Paint -> unit
override this.DrawBitmap : Android.Graphics.Bitmap * single * single * Android.Graphics.Paint -> unit

パラメーター

bitmap
Bitmap

描画するビットマップ

left
Single

描画するビットマップの左側の位置

top
Single

描画するビットマップの上辺の位置

paint
Paint

ビットマップの描画に使用されるペイント (null の場合があります)

属性

注釈

現在のマトリックスによって変換された、指定したペイントを使用して、指定したビットマップを左上隅 (x,y) で描画します。

注: ペイントに、ビットマップの元の幅/高さ (BlurMaskFilter など) を超えるマスクを生成するマスク フィルターが含まれている場合、ビットマップは CLAMP モードのシェーダーの場合と同様に描画されます。 したがって、元の幅/高さの外側の色は、レプリケートされたエッジの色になります。

ビットマップとキャンバスの密度が異なる場合、この関数は、キャンバスと同じ密度で描画するようにビットマップを自動的にスケーリングします。

android.graphics.Canvas.drawBitmap(android.graphics.Bitmap, float, float, android.graphics.Paint)Java ドキュメント。

このページの一部は、によって作成および共有された作業に基づく変更であり、に記載されている条件に従って使用されます。

適用対象

DrawBitmap(Bitmap, Rect, Rect, Paint)

指定したビットマップを描画し、自動的に拡大縮小/変換して、変換先の四角形を塗りつぶします。

[Android.Runtime.Register("drawBitmap", "(Landroid/graphics/Bitmap;Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Paint;)V", "GetDrawBitmap_Landroid_graphics_Bitmap_Landroid_graphics_Rect_Landroid_graphics_Rect_Landroid_graphics_Paint_Handler")]
public virtual void DrawBitmap (Android.Graphics.Bitmap bitmap, Android.Graphics.Rect? src, Android.Graphics.Rect dst, Android.Graphics.Paint? paint);
[<Android.Runtime.Register("drawBitmap", "(Landroid/graphics/Bitmap;Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Paint;)V", "GetDrawBitmap_Landroid_graphics_Bitmap_Landroid_graphics_Rect_Landroid_graphics_Rect_Landroid_graphics_Paint_Handler")>]
abstract member DrawBitmap : Android.Graphics.Bitmap * Android.Graphics.Rect * Android.Graphics.Rect * Android.Graphics.Paint -> unit
override this.DrawBitmap : Android.Graphics.Bitmap * Android.Graphics.Rect * Android.Graphics.Rect * Android.Graphics.Paint -> unit

パラメーター

bitmap
Bitmap

描画するビットマップ

src
Rect

null も指定できます。 描画するビットマップのサブセット

dst
Rect

ビットマップが合うように拡大縮小または翻訳される四角形

paint
Paint

null も指定できます。 ビットマップの描画に使用されるペイント

属性

注釈

指定したビットマップを描画し、自動的に拡大縮小/変換して、変換先の四角形を塗りつぶします。 ソースの四角形が null でない場合は、描画するビットマップのサブセットを指定します。

注: ペイントに、ビットマップの元の幅/高さ (BlurMaskFilter など) を超えるマスクを生成するマスク フィルターが含まれている場合、ビットマップは CLAMP モードのシェーダーの場合と同様に描画されます。 したがって、元の幅/高さの外側の色は、レプリケートされたエッジの色になります。

この関数 <em>は、bitmap</em に関連付けられている密度を無視します>。 これは、ソースとターゲットの四角形の座標空間がそれぞれの密度にあるため、適切なスケーリング 係数が既に適用されている必要があるためです。

android.graphics.Canvas.drawBitmap(android.graphics.Bitmap, android.graphics.Rect, android.graphics.Rect, android.graphics.Paint)Java ドキュメント。

このページの一部は、によって作成および共有された作業に基づく変更であり、に記載されている条件に従って使用されます。

適用対象

DrawBitmap(Bitmap, Matrix, Paint)

指定したマトリックスを使用してビットマップを描画します。

[Android.Runtime.Register("drawBitmap", "(Landroid/graphics/Bitmap;Landroid/graphics/Matrix;Landroid/graphics/Paint;)V", "GetDrawBitmap_Landroid_graphics_Bitmap_Landroid_graphics_Matrix_Landroid_graphics_Paint_Handler")]
public virtual void DrawBitmap (Android.Graphics.Bitmap bitmap, Android.Graphics.Matrix matrix, Android.Graphics.Paint? paint);
[<Android.Runtime.Register("drawBitmap", "(Landroid/graphics/Bitmap;Landroid/graphics/Matrix;Landroid/graphics/Paint;)V", "GetDrawBitmap_Landroid_graphics_Bitmap_Landroid_graphics_Matrix_Landroid_graphics_Paint_Handler")>]
abstract member DrawBitmap : Android.Graphics.Bitmap * Android.Graphics.Matrix * Android.Graphics.Paint -> unit
override this.DrawBitmap : Android.Graphics.Bitmap * Android.Graphics.Matrix * Android.Graphics.Paint -> unit

パラメーター

bitmap
Bitmap

描画するビットマップ

matrix
Matrix

描画時にビットマップを変換するために使用されるマトリックス

paint
Paint

null も指定できます。 ビットマップの描画に使用されるペイント

属性

注釈

指定したマトリックスを使用してビットマップを描画します。

android.graphics.Canvas.drawBitmap(android.graphics.Bitmap, android.graphics.Matrix, android.graphics.Paint)Java ドキュメント。

このページの一部は、によって作成および共有された作業に基づく変更であり、に記載されている条件に従って使用されます。

適用対象

DrawBitmap(Bitmap, Rect, RectF, Paint)

指定したビットマップを描画し、自動的に拡大縮小/変換して、変換先の四角形を塗りつぶします。

[Android.Runtime.Register("drawBitmap", "(Landroid/graphics/Bitmap;Landroid/graphics/Rect;Landroid/graphics/RectF;Landroid/graphics/Paint;)V", "GetDrawBitmap_Landroid_graphics_Bitmap_Landroid_graphics_Rect_Landroid_graphics_RectF_Landroid_graphics_Paint_Handler")]
public virtual void DrawBitmap (Android.Graphics.Bitmap bitmap, Android.Graphics.Rect? src, Android.Graphics.RectF dst, Android.Graphics.Paint? paint);
[<Android.Runtime.Register("drawBitmap", "(Landroid/graphics/Bitmap;Landroid/graphics/Rect;Landroid/graphics/RectF;Landroid/graphics/Paint;)V", "GetDrawBitmap_Landroid_graphics_Bitmap_Landroid_graphics_Rect_Landroid_graphics_RectF_Landroid_graphics_Paint_Handler")>]
abstract member DrawBitmap : Android.Graphics.Bitmap * Android.Graphics.Rect * Android.Graphics.RectF * Android.Graphics.Paint -> unit
override this.DrawBitmap : Android.Graphics.Bitmap * Android.Graphics.Rect * Android.Graphics.RectF * Android.Graphics.Paint -> unit

パラメーター

bitmap
Bitmap

描画するビットマップ

src
Rect

null も指定できます。 描画するビットマップのサブセット

dst
RectF

ビットマップが合うように拡大縮小または翻訳される四角形

paint
Paint

null も指定できます。 ビットマップの描画に使用されるペイント

属性

注釈

指定したビットマップを描画し、自動的に拡大縮小/変換して、変換先の四角形を塗りつぶします。 ソースの四角形が null でない場合は、描画するビットマップのサブセットを指定します。

注: ペイントに、ビットマップの元の幅/高さ (BlurMaskFilter など) を超えるマスクを生成するマスク フィルターが含まれている場合、ビットマップは CLAMP モードのシェーダーの場合と同様に描画されます。 したがって、元の幅/高さの外側の色は、レプリケートされたエッジの色になります。

この関数 <em>は、bitmap</em に関連付けられている密度を無視します>。 これは、ソースとターゲットの四角形の座標空間がそれぞれの密度にあるため、適切なスケーリング 係数が既に適用されている必要があるためです。

android.graphics.Canvas.drawBitmap(android.graphics.Bitmap, android.graphics.Rect, android.graphics.RectF, android.graphics.Paint)Java ドキュメント。

このページの一部は、によって作成および共有された作業に基づく変更であり、に記載されている条件に従って使用されます。

適用対象