GradientDrawable.SetStroke 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| SetStroke(Int32, ColorStateList) |
設定可繪圖物件的筆劃寬度和顏色狀態清單。 |
| SetStroke(Int32, Color) |
設定可繪圖的筆劃寬度和顏色。 |
| SetStroke(Int32, ColorStateList, Single, Single) |
設定可繪圖物件的筆劃寬度和顏色狀態清單。 |
| SetStroke(Int32, Color, Single, Single) |
設定可繪圖的筆劃寬度和顏色。 |
SetStroke(Int32, ColorStateList)
設定可繪圖物件的筆劃寬度和顏色狀態清單。
[Android.Runtime.Register("setStroke", "(ILandroid/content/res/ColorStateList;)V", "GetSetStroke_ILandroid_content_res_ColorStateList_Handler")]
public virtual void SetStroke(int width, Android.Content.Res.ColorStateList? colorStateList);
[<Android.Runtime.Register("setStroke", "(ILandroid/content/res/ColorStateList;)V", "GetSetStroke_ILandroid_content_res_ColorStateList_Handler")>]
abstract member SetStroke : int * Android.Content.Res.ColorStateList -> unit
override this.SetStroke : int * Android.Content.Res.ColorStateList -> unit
參數
- width
- Int32
筆劃的像素寬度
- colorStateList
- ColorStateList
筆劃的色彩狀態列表
- 屬性
備註
設定可繪圖物件的筆劃寬度和顏色狀態清單。 若寬度為零,則不畫筆劃。
<強力>注意</強力>:更改此屬性將影響所有從資源載入的可繪製物實例。 建議在變更此性質前先行使該 #mutate() 權利。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。
另請參閱
- <xref:Android.Graphics.Drawables.GradientDrawable.SetStroke(System.Int32%2c+Android.Content.Res.ColorStateList%2c+Android.Content.Res.ColorStateList%2c+Android.Content.Res.ColorStateList)>
適用於
SetStroke(Int32, Color)
設定可繪圖的筆劃寬度和顏色。
[Android.Runtime.Register("setStroke", "(II)V", "GetSetStroke_IIHandler")]
public virtual void SetStroke(int width, Android.Graphics.Color color);
[<Android.Runtime.Register("setStroke", "(II)V", "GetSetStroke_IIHandler")>]
abstract member SetStroke : int * Android.Graphics.Color -> unit
override this.SetStroke : int * Android.Graphics.Color -> unit
參數
- width
- Int32
筆劃的像素寬度
- color
- Color
筆劃的顏色
- 屬性
備註
設定可繪圖的筆劃寬度和顏色。 若寬度為零,則不畫筆劃。
<強力>注意</強力>:更改此屬性將影響所有從資源載入的可繪製物實例。 建議在變更此性質前先行使該 #mutate() 權利。
Java 文件 android.graphics.drawable.GradientDrawable.setStroke(int, int)。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。
另請參閱
- <xref:Android.Graphics.Drawables.GradientDrawable.SetStroke(System.Int32%2c+Android.Graphics.Color%2c+Android.Graphics.Color%2c+Android.Graphics.Color)>
適用於
SetStroke(Int32, ColorStateList, Single, Single)
設定可繪圖物件的筆劃寬度和顏色狀態清單。
[Android.Runtime.Register("setStroke", "(ILandroid/content/res/ColorStateList;FF)V", "GetSetStroke_ILandroid_content_res_ColorStateList_FFHandler")]
public virtual void SetStroke(int width, Android.Content.Res.ColorStateList? colorStateList, float dashWidth, float dashGap);
[<Android.Runtime.Register("setStroke", "(ILandroid/content/res/ColorStateList;FF)V", "GetSetStroke_ILandroid_content_res_ColorStateList_FFHandler")>]
abstract member SetStroke : int * Android.Content.Res.ColorStateList * single * single -> unit
override this.SetStroke : int * Android.Content.Res.ColorStateList * single * single -> unit
參數
- width
- Int32
筆劃的像素寬度
- colorStateList
- ColorStateList
筆劃的色彩狀態列表
- dashWidth
- Single
破折號的像素長度,設為 0 以禁用破折號
- dashGap
- Single
破折號之間的像素間隙
- 屬性
備註
設定可繪圖物件的筆劃寬度和顏色狀態清單。 若寬度為零,則不畫筆劃。 此方法也可用於劃槳。
<強力>注意</強力>:更改此屬性將影響所有從資源載入的可繪製物實例。 建議在變更此性質前先行使該 #mutate() 權利。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。
另請參閱
- <xref:Android.Graphics.Drawables.GradientDrawable.SetStroke(System.Int32%2c+Android.Content.Res.ColorStateList)>
適用於
SetStroke(Int32, Color, Single, Single)
設定可繪圖的筆劃寬度和顏色。
[Android.Runtime.Register("setStroke", "(IIFF)V", "GetSetStroke_IIFFHandler")]
public virtual void SetStroke(int width, Android.Graphics.Color color, float dashWidth, float dashGap);
[<Android.Runtime.Register("setStroke", "(IIFF)V", "GetSetStroke_IIFFHandler")>]
abstract member SetStroke : int * Android.Graphics.Color * single * single -> unit
override this.SetStroke : int * Android.Graphics.Color * single * single -> unit
參數
- width
- Int32
筆劃的像素寬度
- color
- Color
筆劃的顏色
- dashWidth
- Single
破折號的像素長度,設為 0 以禁用破折號
- dashGap
- Single
破折號之間的像素間隙
- 屬性
備註
設定可繪圖的筆劃寬度和顏色。 若寬度為零,則不畫筆劃。 此方法也可用於劃槳。
<強力>注意</強力>:更改此屬性將影響所有從資源載入的可繪製物實例。 建議在變更此性質前先行使該 #mutate() 權利。
Java 文件 android.graphics.drawable.GradientDrawable.setStroke(int, int, float, float)。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。
另請參閱
- <xref:Android.Graphics.Drawables.GradientDrawable.SetStroke(System.Int32%2c+Android.Graphics.Color)>