Pattern.getColorStopRgba

cairo.types.Status getColorStopRgba(int index, out double offset, out double red, out double green, out double blue, out double alpha)

Gets the color and offset information at the given index for a gradient pattern. Values of index range from 0 to n-1 where n is the number returned by [cairo.pattern.Pattern.getColorStopCount].

Note that the color and alpha values are not premultiplied.

Parameters

indexindex of the stop to return data for
offsetreturn value for the offset of the stop, or null
redreturn value for red component of color, or null
greenreturn value for green component of color, or null
bluereturn value for blue component of color, or null
alphareturn value for alpha component of color, or null

Returns

[cairo.types.Status.Success], or [cairo.types.Status.InvalidIndex]

if index is not valid for the given pattern. If the pattern is not a gradient pattern, [cairo.types.Status.PatternTypeMismatch] is returned.