RecordingCanvas.DrawBitmap 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| DrawBitmap(Bitmap, Matrix, Paint) |
使用指定的矩陣繪製位圖。 |
| DrawBitmap(Bitmap, Rect, Rect, Paint) |
繪製指定的點陣圖,並自動縮放/平移填滿目標矩形。 |
| DrawBitmap(Bitmap, Rect, RectF, Paint) |
繪製指定的點陣圖,並自動縮放/平移填滿目標矩形。 |
| DrawBitmap(Bitmap, Single, Single, Paint) |
繪製指定的位圖,其左上角位於 (x,y),使用指定的塗料,並由當前矩陣轉換。 |
| DrawBitmap(Int32[], Int32, Int32, Int32, Int32, Int32, Int32, Boolean, Paint) |
已淘汰.
|
| DrawBitmap(Int32[], Int32, Int32, Single, Single, Int32, Int32, Boolean, Paint) |
已淘汰.
將指定的顏色陣列視為點陣圖,並繪製它。 |
DrawBitmap(Bitmap, Matrix, Paint)
使用指定的矩陣繪製位圖。
[Android.Runtime.Register("drawBitmap", "(Landroid/graphics/Bitmap;Landroid/graphics/Matrix;Landroid/graphics/Paint;)V", "", ApiSince=29)]
public override sealed 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", "", ApiSince=29)>]
override this.DrawBitmap : Android.Graphics.Bitmap * Android.Graphics.Matrix * Android.Graphics.Paint -> unit
參數
- bitmap
- Bitmap
- matrix
- Matrix
- paint
- Paint
- 屬性
備註
使用指定的矩陣繪製位圖。
Android 參考資料。android.graphics.RecordingCanvas.drawBitmap
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。
適用於
DrawBitmap(Bitmap, Rect, Rect, Paint)
繪製指定的點陣圖,並自動縮放/平移填滿目標矩形。
[Android.Runtime.Register("drawBitmap", "(Landroid/graphics/Bitmap;Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Paint;)V", "", ApiSince=29)]
public override sealed 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", "", ApiSince=29)>]
override this.DrawBitmap : Android.Graphics.Bitmap * Android.Graphics.Rect * Android.Graphics.Rect * Android.Graphics.Paint -> unit
參數
- bitmap
- Bitmap
- src
- Rect
- dst
- Rect
- paint
- Paint
- 屬性
備註
繪製指定的點陣圖,並自動縮放/平移填滿目標矩形。 如果來源矩形不是 null,則指定要繪製的點陣子集。 注意:如果 Paint 包含一個遮罩濾鏡,產生的遮罩範圍超出點陣原本的寬度/高度(例如 BlurMaskFilter),那麼該點陣圖會以帶有 CLAMP 模式的著色器繪製方式繪製。 因此,原本寬度/高度之外的顏色就是被複製的邊緣顏色。 此函數忽略與位圖相關的密度。 這是因為來源與目標矩形座標空間各自處於密度,必須已套用適當的縮放因子。
Android 參考資料。android.graphics.RecordingCanvas.drawBitmap
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。
適用於
DrawBitmap(Bitmap, Rect, RectF, Paint)
繪製指定的點陣圖,並自動縮放/平移填滿目標矩形。
[Android.Runtime.Register("drawBitmap", "(Landroid/graphics/Bitmap;Landroid/graphics/Rect;Landroid/graphics/RectF;Landroid/graphics/Paint;)V", "", ApiSince=29)]
public override sealed 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", "", ApiSince=29)>]
override this.DrawBitmap : Android.Graphics.Bitmap * Android.Graphics.Rect * Android.Graphics.RectF * Android.Graphics.Paint -> unit
參數
- bitmap
- Bitmap
- src
- Rect
- dst
- RectF
- paint
- Paint
- 屬性
備註
繪製指定的點陣圖,並自動縮放/平移填滿目標矩形。 如果來源矩形不是 null,則指定要繪製的點陣子集。 注意:如果 Paint 包含一個遮罩濾鏡,產生的遮罩範圍超出點陣原本的寬度/高度(例如 BlurMaskFilter),那麼該點陣圖會以帶有 CLAMP 模式的著色器繪製方式繪製。 因此,原本寬度/高度之外的顏色就是被複製的邊緣顏色。 此函數忽略與位圖相關的密度。 這是因為來源與目標矩形座標空間各自處於密度,必須已套用適當的縮放因子。
Android 參考資料。android.graphics.RecordingCanvas.drawBitmap
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。
適用於
DrawBitmap(Bitmap, Single, Single, Paint)
繪製指定的位圖,其左上角位於 (x,y),使用指定的塗料,並由當前矩陣轉換。
[Android.Runtime.Register("drawBitmap", "(Landroid/graphics/Bitmap;FFLandroid/graphics/Paint;)V", "", ApiSince=29)]
public override sealed 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", "", ApiSince=29)>]
override this.DrawBitmap : Android.Graphics.Bitmap * single * single * Android.Graphics.Paint -> unit
參數
- bitmap
- Bitmap
- left
- Single
繪製點陣左側的位置
- top
- Single
正在繪製的位圖上方的位置
- paint
- Paint
- 屬性
備註
繪製指定的位圖,其左上角位於 (x,y),使用指定的塗料,並由當前矩陣轉換。 注意:如果 Paint 包含一個遮罩濾鏡,產生的遮罩範圍超出點陣原本的寬度/高度(例如 BlurMaskFilter),那麼該點陣圖會以帶有 CLAMP 模式的著色器繪製方式繪製。 因此,原本寬度/高度之外的顏色就是被複製的邊緣顏色。 如果點陣圖和畫布密度不同,這個功能會自動調整點陣圖,使其繪製密度與畫布相同。
Android 參考資料。android.graphics.RecordingCanvas.drawBitmap
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。
適用於
DrawBitmap(Int32[], Int32, Int32, Int32, Int32, Int32, Int32, Boolean, Paint)
警告
deprecated
[Android.Runtime.Register("drawBitmap", "([IIIIIIIZLandroid/graphics/Paint;)V", "", ApiSince=29)]
[System.Obsolete("deprecated")]
public override sealed 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", "", ApiSince=29)>]
[<System.Obsolete("deprecated")>]
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
- 屬性
備註
此方法已被取代。
Android 參考資料。android.graphics.RecordingCanvas.drawBitmap
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。
適用於
DrawBitmap(Int32[], Int32, Int32, Single, Single, Int32, Int32, Boolean, Paint)
警告
deprecated
將指定的顏色陣列視為點陣圖,並繪製它。
[Android.Runtime.Register("drawBitmap", "([IIIFFIIZLandroid/graphics/Paint;)V", "", ApiSince=29)]
[System.Obsolete("deprecated")]
public override sealed 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", "", ApiSince=29)>]
[<System.Obsolete("deprecated")>]
override this.DrawBitmap : int[] * int * int * single * single * int * int * bool * Android.Graphics.Paint -> unit
參數
- colors
- Int32[]
- offset
- Int32
偏移到第一個像素的顏色陣列中
- stride
- Int32
陣列中列間的顏色數量(必須是 >= 寬度或 <= -width)。
- x
- Single
X 座標用於繪製點陣圖的位置
- y
- Single
繪製點陣圖的 Y 座標
- width
- Int32
點陣圖的寬度
- height
- Int32
點陣圖的高度
- hasAlpha
- Boolean
若顏色的 alpha 通道包含有效值,則為真。 若為假,則忽略該 alpha 位元組(假設每個像素皆為 0xFF)。
- paint
- Paint
- 屬性
備註
此方法已被取代。 使用硬體加速畫布時,每次呼叫此方法時,都需要內部副本色彩緩衝區內容。 使用位圖可避免此複製,並允許應用程式更明確地控制像素資料的壽命與複製數量。
Android 參考資料。android.graphics.RecordingCanvas.drawBitmap
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。