/* * call-seq: * clip -> Rect * * Return the clipping area for this Surface. See also #cliprect=. * * The clipping area of a Surface is the only part which can be drawn upon * by other Surface's #blits. By default, the clipping area is the entire area * of the Surface. */ VALUE rbgm_surface_get_clip( VALUE self ) { SDL_Rect rect; SDL_Surface *surf; Data_Get_Struct(self, SDL_Surface, surf); SDL_GetClipRect(surf, &rect); return rb_funcall(cRect,rb_intern("new"),4, INT2NUM(rect.x),INT2NUM(rect.y), INT2NUM(rect.w),INT2NUM(rect.h)); }