FS#145 - Implement copy constructors and ToString functions in SFML.Net
git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1330 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
bd9a60fef2
commit
dd255a916d
28 changed files with 627 additions and 0 deletions
|
@ -83,6 +83,18 @@ namespace SFML
|
|||
Size = size;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// <summary>
|
||||
/// Construct the text from another text
|
||||
/// </summary>
|
||||
/// <param name="copy">Text to copy</param>
|
||||
////////////////////////////////////////////////////////////
|
||||
public Text(Text copy) :
|
||||
base(sfText_Copy(copy.This))
|
||||
{
|
||||
Font = copy.Font;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// <summary>
|
||||
/// Position of the object on screen
|
||||
|
@ -256,6 +268,28 @@ namespace SFML
|
|||
return Pos;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// <summary>
|
||||
/// Provide a string describing the object
|
||||
/// </summary>
|
||||
/// <returns>String description of the object</returns>
|
||||
////////////////////////////////////////////////////////////
|
||||
public override string ToString()
|
||||
{
|
||||
return "[Text]" +
|
||||
" Position = " + Position +
|
||||
" Rotation = " + Rotation +
|
||||
" Scale = " + Scale +
|
||||
" Origin = " + Origin +
|
||||
" Color = " + Color +
|
||||
" BlendMode = " + BlendMode +
|
||||
" String = " + DisplayedString +
|
||||
" Font = " + Font +
|
||||
" Size = " + Size +
|
||||
" Style = " + Style +
|
||||
" Rectangle = " + GetRect();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// <summary>
|
||||
/// Render the object into the given render window
|
||||
|
@ -303,6 +337,9 @@ namespace SFML
|
|||
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
|
||||
static extern IntPtr sfText_Create();
|
||||
|
||||
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
|
||||
static extern IntPtr sfText_Copy(IntPtr Text);
|
||||
|
||||
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
|
||||
static extern void sfText_Destroy(IntPtr This);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue