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_get_color_stop_count().

cairo_pattern_get_color_stop_rgba(
  pattern,
  index,
  offset,
  red,
  green,
  blue,
  alpha
)

Arguments

pattern

[cairo_pattern_t *] a #cairo_pattern_t

index

[int] index of the stop to return data for

offset

[double *] return value for the offset of the stop, or %NULL

red

[double *] return value for red component of color, or %NULL

green

[double *] return value for green component of color, or %NULL

blue

[double *] return value for blue component of color, or %NULL

alpha

[double *] return value for alpha component of color, or %NULL

Value

[int]

Details

Return value: %CAIRO_STATUS_SUCCESS, or %CAIRO_STATUS_INVALID_INDEX if index is not valid for the given pattern. If the pattern is not a gradient pattern, %CAIRO_STATUS_PATTERN_TYPE_MISMATCH is returned.

Since: 1.4

C function prototype: cairo_status_t cairo_pattern_get_color_stop_rgba (cairo_pattern_t *pattern, int index, double *offset, double *red, double *green, double *blue, double *alpha)

See also