Added commentaries to all new initialize methods.

Also moved the commentaries in SFML::Window from the Window_New function to Window_Initialize.

git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1746 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
groogy 2010-12-04 21:17:35 +00:00
parent aa39447c26
commit 0aafc6b6ba
7 changed files with 60 additions and 13 deletions

View file

@ -130,6 +130,14 @@ static VALUE Font_GetImage( VALUE self, VALUE aCharacterSize )
return rbImage;
}
/* call-seq:
* Font.new() -> font
* Font.new( filename ) -> font
*
* Will create a new font instance.
*
* If a filename argument is specified then font#loadFromFile will be called on the created instance.
*/
static VALUE Font_Initialize( int argc, VALUE *args, VALUE self )
{
if( argc > 0 )

View file

@ -517,6 +517,16 @@ static VALUE Image_GetTexCoords( VALUE self, VALUE aRectangle )
rb_float_new( result.Width ), rb_float_new( result.Height ) );
}
/* call-seq:
* Image.new() -> image
* Image.new( filename ) -> image
* Image.new( width, height, pixels ) -> image
*
* Will create a new image instance.
*
* If a filename argument is specified then image#loadFromFile will be called on the created instance. If width, height
* and pixels are specified then image#loadFromPixels will be called on the created instance.
*/
static VALUE Image_Initialize( int argc, VALUE *args, VALUE self )
{
if( argc > 1 )

View file

@ -283,6 +283,14 @@ static VALUE RenderImage_GetHeight( VALUE self )
return INT2FIX( object->GetHeight() );
}
/* call-seq:
* RenderImage.new() -> render_image
* RenderImage.new( width, height, depthBuffer = false ) -> render_image
*
* Will create a new render image instance.
*
* If any arguments are specified then a call to the #create method will be made passing the arguments to it.
*/
static VALUE RenderImage_Initialize( int argc, VALUE *args, VALUE self )
{
if( argc > 0 )

View file

@ -215,7 +215,14 @@ static VALUE Shader_Unbind( VALUE self )
return Qnil;
}
/* call-seq:
* Shader.new() -> shader
* Shader.new( filename ) -> shader
*
* Will create a new shader instance.
*
* If a filename argument is specified then shader#loadFromFile will be called on the created instance.
*/
static VALUE Shader_Initialize( int argc, VALUE *args, VALUE self )
{
if( argc > 0 )