component1
Returns the first component of the color. For instance, when the color model of the color is android.graphics.ColorSpace.Model.RGB, the first component is "red".
This method allows to use destructuring declarations when working with colors, for example:
val (red, green, blue) = myColorReturn the alpha component of a color int. This is equivalent to calling:
Color.alpha(myInt)This method allows to use destructuring declarations when working with colors, for example:
val (alpha, red, green, blue) = myColorReturns the first component of the color. For instance, when the color model of the color is android.graphics.ColorSpace.Model.RGB, the first component is "red".
This method allows to use destructuring declarations when working with colors, for example:
val (red, green, blue, alpha) = myColorLongReturns the x coordinate of this point.
This method allows to use destructuring declarations when working with points, for example:
val (x, y) = myPointReturns "left", the first component of the rectangle.
This method allows to use destructuring declarations when working with rectangles, for example:
val (left, top, right, bottom) = myRectangle