次の方法で共有


ColorObject.GetComponents Method

Definition

Overloads

GetComponents()

Returns this color's components as a new array.

GetComponents(Single[])

Copies this color's components in the supplied array.

GetComponents()

Returns this color's components as a new array.

[Android.Runtime.Register("getComponents", "()[F", "GetGetComponentsHandler", ApiSince=26)]
public virtual float[] GetComponents ();
[<Android.Runtime.Register("getComponents", "()[F", "GetGetComponentsHandler", ApiSince=26)>]
abstract member GetComponents : unit -> single[]
override this.GetComponents : unit -> single[]

Returns

Single[]

A new, non-null array whose size is equal to #getComponentCount()

Attributes

Remarks

Returns this color's components as a new array. The last element of the array is always the alpha component.

Java documentation for android.graphics.Color.getComponents().

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

GetComponents(Single[])

Copies this color's components in the supplied array.

[Android.Runtime.Register("getComponents", "([F)[F", "GetGetComponents_arrayFHandler", ApiSince=26)]
public virtual float[] GetComponents (float[]? components);
[<Android.Runtime.Register("getComponents", "([F)[F", "GetGetComponents_arrayFHandler", ApiSince=26)>]
abstract member GetComponents : single[] -> single[]
override this.GetComponents : single[] -> single[]

Parameters

components
Single[]

An array of floats whose size must be at least #getComponentCount(), can be null

Returns

Single[]

The array passed as a parameter if not null, or a new array of length #getComponentCount()

Attributes

Remarks

Copies this color's components in the supplied array. The last element of the array is always the alpha component.

Java documentation for android.graphics.Color.getComponents(float[]).

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