//NewRadialGradient creates a new radial gradient between the circles //start and end, with specified color stops. // //Originally cairo_pattern_create_radial and cairo_pattern_add_color_stop_rgba. func NewRadialGradient(start, end Circle, colorStops ...ColorStop) RadialGradient { x0, y0, r0 := start.c() x1, y1, r1 := end.c() p := C.cairo_pattern_create_radial(x0, y0, r0, x1, y1, r1) P := patternGradient{ XtensionPattern: XtensionNewPattern(p), } P.addColorStops(colorStops) return RadialGradient{ patternGradient: P, start: start, end: end, } }
// cairo_pattern_t* cairo_pattern_create_radial (double cx0, double cy0, double radius0, double cx1, double cy1, double radius1); func RadialGradient(cx0, cy0, radius0, cx1, cy1, radius1 float64) (pattern *Pattern) { return &Pattern{C.cairo_pattern_create_radial(C.double(cx0), C.double(cy0), C.double(radius0), C.double(cx1), C.double(cy1), C.double(radius1))} }