# class Cairo::SurfacePattern

### Public Class Methods

new(p1) click to toggle source

    static VALUE
    cr_surface_pattern_initialize (VALUE self, VALUE surface)
    {
      cairo_pattern_t *pattern;

      pattern = cairo_pattern_create_for_surface (RVAL2CRSURFACE (surface));
      cr_pattern_check_status (pattern);
      DATA_PTR (self) = pattern;
      return Qnil;
    }

### Public Instance Methods

surface() click to toggle source

    static VALUE
    cr_surface_pattern_get_surface (VALUE self)
    {
      cairo_surface_t *surface;

      rb_cairo_check_status (cairo_pattern_get_surface (_SELF (self), &surface));
      return CRSURFACE2RVAL (surface);
    }