using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace BansheeEngine
{
/** @addtogroup GUI_Engine
* @{
*/
///
/// Font resource containing data about textual characters and how to render text. Contains one or multiple font bitmaps,
/// each for a specific size.
///
public partial class Font : Resource
{
private Font(bool __dummy0) { }
protected Font() { }
/// Returns a reference wrapper for this resource.
public RRef Ref
{
get { return Internal_GetRef(mCachedPtr); }
}
/// Returns a reference wrapper for this resource.
public static implicit operator RRef(Font x)
{ return Internal_GetRef(x.mCachedPtr); }
/// Returns font bitmap for a specific font size.
/// Size of the bitmap in points.
/// Bitmap object if it exists, false otherwise.
public FontBitmap GetBitmap(uint size)
{
return Internal_getBitmap(mCachedPtr, size);
}
/// Finds the available font bitmap size closest to the provided size.
/// Size of the bitmap in points.
/// Nearest available bitmap size.
public int GetClosestSize(uint size)
{
return Internal_getClosestSize(mCachedPtr, size);
}
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern RRef Internal_GetRef(IntPtr thisPtr);
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern FontBitmap Internal_getBitmap(IntPtr thisPtr, uint size);
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern int Internal_getClosestSize(IntPtr thisPtr, uint size);
}
/** @} */
}