Fixed a bug in RenderImage where RenderImage_GetHeight was named RenderTarget_GetHeight which should've led to that you couldn't even compile the source.
Also added so that when creating a new RenderImage instance that if you give any arguments then those will be passed on to a method call to SFML::RenderImage#create. git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1744 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
f2be71b1ea
commit
44e811ec64
@ -276,13 +276,22 @@ static VALUE RenderImage_GetWidth( VALUE self )
|
||||
return INT2FIX( object->GetWidth() );
|
||||
}
|
||||
|
||||
static VALUE RenderTarget_GetHeight( VALUE self )
|
||||
static VALUE RenderImage_GetHeight( VALUE self )
|
||||
{
|
||||
sf::RenderImage *object = NULL;
|
||||
Data_Get_Struct( self, sf::RenderImage, object );
|
||||
return INT2FIX( object->GetHeight() );
|
||||
}
|
||||
|
||||
static VALUE RenderImage_Initialize( int argc, VALUE *args, VALUE self )
|
||||
{
|
||||
if( argc > 0 )
|
||||
{
|
||||
rb_funcall2( self, rb_intern( "create" ), argc, args );
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
/* call-seq:
|
||||
* RenderImage.new() -> render_image
|
||||
*
|
||||
@ -383,6 +392,7 @@ void Init_RenderImage( void )
|
||||
rb_define_singleton_method( globalRenderImageClass, "isAvailable", RenderImage_IsAvailable, 0 );
|
||||
|
||||
// Instance methods
|
||||
rb_define_method( globalRenderImageClass, "initialize", RenderImage_Initialize, -1 );
|
||||
rb_define_method( globalRenderImageClass, "draw", RenderImage_Create, -1 );
|
||||
rb_define_method( globalRenderImageClass, "create", RenderImage_Create, -1 );
|
||||
rb_define_method( globalRenderImageClass, "display", RenderImage_Display, 0 );
|
||||
|
Loading…
Reference in New Issue
Block a user