class Cairo::Rectangle - cairo-1.16.4 Documentation

# class Cairo::Rectangle

### Public Class Methods

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

    static VALUE
    cr_rectangle_initialize (VALUE self, VALUE x, VALUE y,
                             VALUE width, VALUE height)
    {
      cairo_rectangle_int_t *rectangle;

      rectangle = ALLOC (cairo_rectangle_int_t);
      DATA_PTR (self) = rectangle;

      rectangle->x = NUM2INT (x);
      rectangle->y = NUM2INT (y);
      rectangle->width = NUM2INT (width);
      rectangle->height = NUM2INT (height);

      return Qnil;
    }