/* * call-seq: * masks -> [r,g,b,a] * * Return the color masks [r,g,b,a] of the surface. Almost everyone can * ignore this function. Color masks are used to separate an * integer representation of a color into its seperate channels. */ VALUE rbgm_surface_get_masks(VALUE self) { SDL_Surface *surf; SDL_PixelFormat *format; Data_Get_Struct(self, SDL_Surface, surf); format = surf->format; return rb_ary_new3(4,\ UINT2NUM(format->Rmask),\ UINT2NUM(format->Gmask),\ UINT2NUM(format->Bmask),\ UINT2NUM(format->Amask)); }