class Cairo::RadialPattern - cairo-1.14.6 Documentation

# class Cairo::RadialPattern

### Public Class Methods

new(p1, p2, p3, p4, p5, p6) click to toggle source

    static VALUE
    cr_radial_pattern_initialize (VALUE self, VALUE cx0, VALUE cy0, VALUE radius0,
                                  VALUE cx1, VALUE cy1, VALUE radius1)
    {
      cairo_pattern_t *pattern;

      pattern = cairo_pattern_create_radial (NUM2DBL (cx0), NUM2DBL (cy0),
                                             NUM2DBL (radius0),
                                             NUM2DBL (cx1), NUM2DBL (cy1),
                                             NUM2DBL (radius1));
      cr_pattern_check_status (pattern);
      DATA_PTR (self) = pattern;
      return Qnil;
    }

### Public Instance Methods

circles() click to toggle source

    static VALUE
    cr_radial_pattern_get_radial_circles (VALUE self)
    {
      cairo_status_t status;
      double x0, y0, r0, x1, y1, r1;

      status = cairo_pattern_get_radial_circles (_SELF (self),
                                                 &x0, &y0, &r0,
                                                 &x1, &y1, &r1);
      rb_cairo_check_status (status);
      return rb_ary_new3 (2,
                          rb_ary_new3 (3,
                                       rb_float_new (x0),
                                       rb_float_new (y0),
                                       rb_float_new (r0)),
                          rb_ary_new3 (3,
                                       rb_float_new (x1),
                                       rb_float_new (y1),
                                       rb_float_new (r1)));
    }