// Copyright (C) 2002-2006 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h #pragma once #using using namespace System; #pragma unmanaged #include "..\\..\\include\\irrlicht.h" #pragma managed #include "Rect.h" #include "Color.h" namespace Irrlicht { namespace GUI { public __gc class IGUIFont { public: /// /// You should access the IGUIFont /// through the IGUIEnvironment::getFont() property. Simply don't use /// this constructor. /// ///The real, unmanaged C++ font IGUIFont(irr::gui::IGUIFont* font); ~IGUIFont(); /// /// Draws an text and clips it to the specified rectangle. /// /// Text to draw /// Color of the text /// Specifiies if the text should be centered vertically into the rectangle. /// Text to draw /// Color of the text void Draw(System::String* text, Core::Position2D position, Video::Color color); /// /// Draws an text. /// /// Text to draw /// Color of the text /// Specifiies if the text should be centered vertically into the rectangle. void Draw(System::String* text, Core::Rect position, Video::Color color, bool hcenter, bool vcenter); /// /// Calculates the dimension of a text. /// /// Returns width and height of the area covered by the text if it would be /// drawn. Core::Dimension2D GetDimension(System::String* text); /// /// Returns the internal pointer to the native C++ irrlicht font. /// Do not use this, only needed by the internal .NET wrapper. /// __property irr::gui::IGUIFont* get_NativeFont(); private: irr::gui::IGUIFont* Font; }; } }