Gets the gradient endpoints for a linear gradient.

cairo_pattern_get_linear_points(pattern, x0, y0, x1, y1)

Arguments

pattern

[cairo_pattern_t *] a #cairo_pattern_t

x0

[double *] return value for the x coordinate of the first point, or %NULL

y0

[double *] return value for the y coordinate of the first point, or %NULL

x1

[double *] return value for the x coordinate of the second point, or %NULL

y1

[double *] return value for the y coordinate of the second point, or %NULL

Value

[int]

Details

Return value: %CAIRO_STATUS_SUCCESS, or %CAIRO_STATUS_PATTERN_TYPE_MISMATCH if pattern is not a linear gradient pattern.

Since: 1.4

C function prototype: cairo_status_t cairo_pattern_get_linear_points (cairo_pattern_t *pattern, double *x0, double *y0, double *x1, double *y1)

See also