/* Note: if the focus is on the border of one of the two circles (in which case the circles are tangent in the focus point), it is not considered as contained in the circle, hence this function returns FALSE.  */
cairo_bool_t _cairo_radial_pattern_focus_is_inside(const cairo_radial_pattern_t *radial)
/* Note: if the focus is on the border of one of the two circles (in which case the circles are tangent in the focus point), it is not considered as contained in the circle, hence this function returns FALSE.  */
cairo_bool_t _cairo_radial_pattern_focus_is_inside(const cairo_radial_pattern_t *radial)
{
    double cx, cy, cr, dx, dy, dr;
    cx = radial->cd1.center.x;
    cy = radial->cd1.center.y;
    cr = radial->cd1.radius;
    dx = radial->cd2.center.x - cx;
    dy = radial->cd2.center.y - cy;
    dr = radial->cd2.radius   - cr;
    return dx*dx + dy*dy < dr*dr;
}