From 4d175b92436367fea90b5e24ace4d5b31f9d4034 Mon Sep 17 00:00:00 2001 From: groogy Date: Fri, 28 Jan 2011 21:50:59 +0000 Subject: [PATCH] Forgot to actually call SetSourceRect in Sprite#setSourceRect git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1781 4e206d99-4929-0410-ac5d-dfc041789085 --- bindings/ruby/sfml-graphics/graphics/Sprite.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bindings/ruby/sfml-graphics/graphics/Sprite.cpp b/bindings/ruby/sfml-graphics/graphics/Sprite.cpp index 6eefe05d..d0f76f39 100644 --- a/bindings/ruby/sfml-graphics/graphics/Sprite.cpp +++ b/bindings/ruby/sfml-graphics/graphics/Sprite.cpp @@ -159,6 +159,9 @@ static VALUE Sprite_SetSubRect( VALUE self, VALUE aRectangle ) rectangle.Top = FIX2INT( Rect_GetTop( temp ) ); rectangle.Width = FIX2INT( Rect_GetWidth( temp ) ); rectangle.Height = FIX2INT( Rect_GetHeight( temp ) ); + sf::Sprite *object = NULL; + Data_Get_Struct( self, sf::Sprite, object ); + object->SetSubRect( rectangle ); return Qnil; }