GradientDrawable.SetStroke メソッド

定義

オーバーロード

名前 説明
SetStroke(Int32, Color, Single, Single)

描画可能なストロークの幅と色を設定します。

SetStroke(Int32, ColorStateList, Single, Single)

描画可能なストロークの幅と色の状態の一覧を設定します。

SetStroke(Int32, ColorStateList)

描画可能なストロークの幅と色の状態の一覧を設定します。

SetStroke(Int32, Color)

描画可能なストロークの幅と色を設定します。

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

ダッシュ間の間隔 (ピクセル単位)

属性

注釈

描画可能なストロークの幅と色を設定します。 幅が 0 の場合、ストロークは描画されません。 このメソッドを使用して、ストロークをダッシュすることもできます。

<strong>Note</strong>: このプロパティを変更すると、リソースから読み込まれたドローアブルのすべてのインスタンスに影響します。 このプロパティを変更する前に、 #mutate() を呼び出しておくことをお勧めします。

Javaドキュメント。

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

こちらもご覧ください

  • <xref:Android.Graphics.Drawables.GradientDrawable.SetStroke(System.Int32%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

ダッシュ間の間隔 (ピクセル単位)

属性

注釈

描画可能なストロークの幅と色の状態の一覧を設定します。 幅が 0 の場合、ストロークは描画されません。 このメソッドを使用して、ストロークをダッシュすることもできます。

<strong>Note</strong>: このプロパティを変更すると、リソースから読み込まれたドローアブルのすべてのインスタンスに影響します。 このプロパティを変更する前に、 #mutate() を呼び出しておくことをお勧めします。

Javaドキュメント。

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

こちらもご覧ください

  • <xref:Android.Graphics.Drawables.GradientDrawable.SetStroke(System.Int32%2c+Android.Content.Res.ColorStateList)>

適用対象

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

ストロークの色の状態リスト

属性

注釈

描画可能なストロークの幅と色の状態の一覧を設定します。 幅が 0 の場合、ストロークは描画されません。

<strong>Note</strong>: このプロパティを変更すると、リソースから読み込まれたドローアブルのすべてのインスタンスに影響します。 このプロパティを変更する前に、 #mutate() を呼び出しておくことをお勧めします。

Javaドキュメント。

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

こちらもご覧ください

  • <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

ストロークの色

属性

注釈

描画可能なストロークの幅と色を設定します。 幅が 0 の場合、ストロークは描画されません。

<strong>Note</strong>: このプロパティを変更すると、リソースから読み込まれたドローアブルのすべてのインスタンスに影響します。 このプロパティを変更する前に、 #mutate() を呼び出しておくことをお勧めします。

Javaドキュメント。

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

こちらもご覧ください

  • <xref:Android.Graphics.Drawables.GradientDrawable.SetStroke(System.Int32%2c+Android.Graphics.Color%2c+Android.Graphics.Color%2c+Android.Graphics.Color)>

適用対象