My Project
D:/source/c++/Programme/sally/sally/sallyAPI/Font.h
Go to the documentation of this file.
00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00026 
00027 
00028 #pragma once
00029 #include "Define.h"
00030 
00031 namespace SallyAPI
00032 {
00033         namespace Core
00034         {
00035                 class CFont;
00036         }
00037 }
00038 
00039 #include "BaseObject.h"
00040 #include "Game.h"
00041 
00042 namespace SallyAPI
00043 {
00044         namespace Core
00045         {
00054 
00055                 class DLL_API_SALLY CFont :
00056                         public SallyAPI::Core::CBaseObject
00057                 {
00058                 private:
00059                         int                     m_iAlphaBlending;
00060                         LPD3DXFONT      m_pFont;
00061                         int                     m_iAlign;
00062                         D3DCOLOR        m_rgbFontColour;
00063                 public:
00064                         CFont(const std::string& fontFace, int height, bool bold, bool italic, bool underlined);
00065                         virtual ~CFont();
00066 
00067                         RECT            CalcualteSize(const std::string& text, int align);
00068                         RECT            CalcualteSize(const std::string& text, int align, RECT rectSize);
00069 
00070                         void            DrawText(const std::string& text, int x, int y, D3DCOLOR rgbFontColour = NULL, int align = -1);
00071                         void            DrawText(const std::string& text, RECT* rect, D3DCOLOR rgbFontColour = NULL, int align = -1);
00072 
00073                         void            SetAlign(int algin);
00074                         void            SetColor(D3DCOLOR rgbFontColour);
00075 
00076                         HRESULT         OnLostDevice();
00077                         HRESULT         OnResetDevice();
00078 
00079                         void            SetAlphaBlending(int alphaBlending);
00080                 };
00081         }
00082 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines