Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

CD3DFont Class Reference

#include <d3dfont8.h>

List of all members.

Public Member Functions

HRESULT BeginText (void)
HRESULT EndText (void)
HRESULT DrawText (FLOAT x, FLOAT y, DWORD dwColor, TCHAR *strText, DWORD dwFlags=0L)
HRESULT DrawTextScaled (FLOAT x, FLOAT y, FLOAT z, FLOAT fXScale, FLOAT fYScale, DWORD dwColor, TCHAR *strText, DWORD dwFlags=0L)
HRESULT GetTextExtent (TCHAR *strText, SIZE *pSize)
HRESULT InitDeviceObjects (LPDIRECT3DDEVICE8 pd3dDevice)
HRESULT RestoreDeviceObjects (void)
HRESULT InvalidateDeviceObjects (void)
HRESULT DeleteDeviceObjects (void)
 CD3DFont (TCHAR *strFontName, DWORD dwHeight, DWORD dwFlags=0L)
 ~CD3DFont ()

Private Types

enum  {
  D3DFVF_FONT2DVERTEX = (D3DFVF_XYZRHW|D3DFVF_DIFFUSE|D3DFVF_TEX1), D3DFVF_FONT3DVERTEX = (D3DFVF_XYZ|D3DFVF_NORMAL|D3DFVF_TEX1), TextBufferLength = 1024, MAX_NUM_VERTICES = TextBufferLength * 6,
  MaxCalls = 30
}

Private Member Functions

HRESULT DeferedDrawText (FLOAT x, FLOAT y, DWORD dwColor, TCHAR *strText, DWORD dwFlags=0L)
HRESULT DeferedDrawTextScaled (FLOAT x, FLOAT y, FLOAT z, FLOAT fXScale, FLOAT fYScale, DWORD dwColor, TCHAR *strText, DWORD dwFlags=0L)
HRESULT DeferedDraw (bool bScaled, FLOAT x, FLOAT y, FLOAT z, FLOAT fXScale, FLOAT fYScale, DWORD dwColor, TCHAR *strText, DWORD dwFlags)
void ClearBeginEndData (void)

Private Attributes

TCHAR m_strFontName [80]
DWORD m_dwFontHeight
DWORD m_dwFontFlags
LPDIRECT3DDEVICE8 m_pd3dDevice
LPDIRECT3DTEXTURE8 m_pTexture
LPDIRECT3DVERTEXBUFFER8 m_pVB
DWORD m_dwTexWidth
DWORD m_dwTexHeight
FLOAT m_fTextScale
FLOAT m_fTexCoords [128-32][4]
DWORD m_dwSavedStateBlock
DWORD m_dwDrawTextStateBlock
DrawTextArgs m_DTArgs [MaxCalls]
char m_TextBuffer [TextBufferLength]
char * m_pTextBuffer
UINT m_nDeferedCalls
bool m_bBeginText


Member Enumeration Documentation

anonymous enum [private]
 

Enumeration values:
D3DFVF_FONT2DVERTEX 
D3DFVF_FONT3DVERTEX 
TextBufferLength 
MAX_NUM_VERTICES 
MaxCalls 

Definition at line 30 of file d3dfont8.h.


Constructor & Destructor Documentation

CD3DFont::CD3DFont TCHAR *  strFontName,
DWORD  dwHeight,
DWORD  dwFlags = 0L
 

Definition at line 46 of file d3dfont8.cxx.

References NULL.

CD3DFont::~CD3DFont  ) 
 

Definition at line 66 of file d3dfont8.cxx.


Member Function Documentation

HRESULT CD3DFont::BeginText void   ) 
 

Definition at line 557 of file d3dfont8.cxx.

References m_bBeginText.

Referenced by DrawText(), and DrawTextScaled().

void CD3DFont::ClearBeginEndData void   )  [inline, private]
 

Definition at line 551 of file d3dfont8.cxx.

References m_nDeferedCalls, m_pTextBuffer, and m_TextBuffer.

HRESULT CD3DFont::DeferedDraw bool  bScaled,
FLOAT  x,
FLOAT  y,
FLOAT  z,
FLOAT  fXScale,
FLOAT  fYScale,
DWORD  dwColor,
TCHAR *  strText,
DWORD  dwFlags
[inline, private]
 

Definition at line 580 of file d3dfont8.cxx.

References DWORD, x, and y.

HRESULT CD3DFont::DeferedDrawText FLOAT  x,
FLOAT  y,
DWORD  dwColor,
TCHAR *  strText,
DWORD  dwFlags = 0L
[inline, private]
 

Definition at line 573 of file d3dfont8.cxx.

References DWORD, x, and y.

Referenced by DrawText().

HRESULT CD3DFont::DeferedDrawTextScaled FLOAT  x,
FLOAT  y,
FLOAT  z,
FLOAT  fXScale,
FLOAT  fYScale,
DWORD  dwColor,
TCHAR *  strText,
DWORD  dwFlags = 0L
[inline, private]
 

Definition at line 565 of file d3dfont8.cxx.

References DWORD, x, and y.

Referenced by DrawTextScaled().

HRESULT CD3DFont::DeleteDeviceObjects void   ) 
 

Definition at line 448 of file d3dfont8.cxx.

References m_pd3dDevice, and NULL.

HRESULT CD3DFont::DrawText FLOAT  x,
FLOAT  y,
DWORD  dwColor,
TCHAR *  strText,
DWORD  dwFlags = 0L
 

Definition at line 532 of file d3dfont8.cxx.

References BeginText(), DeferedDrawText(), EndText(), m_pd3dDevice, and NULL.

HRESULT CD3DFont::DrawTextScaled FLOAT  x,
FLOAT  y,
FLOAT  z,
FLOAT  fXScale,
FLOAT  fYScale,
DWORD  dwColor,
TCHAR *  strText,
DWORD  dwFlags = 0L
 

Definition at line 509 of file d3dfont8.cxx.

References BeginText(), DeferedDrawTextScaled(), EndText(), m_pd3dDevice, NULL, x, and y.

HRESULT CD3DFont::EndText void   ) 
 

Definition at line 617 of file d3dfont8.cxx.

References D3DFVF_FONT2DVERTEX, DWORD, m_pd3dDevice, and NULL.

Referenced by DrawText(), and DrawTextScaled().

HRESULT CD3DFont::GetTextExtent TCHAR *  strText,
SIZE *  pSize
 

Definition at line 467 of file d3dfont8.cxx.

References m_fTexCoords, and NULL.

HRESULT CD3DFont::InitDeviceObjects LPDIRECT3DDEVICE8  pd3dDevice  ) 
 

Definition at line 75 of file d3dfont8.cxx.

References D3DFONT_BOLD, D3DFONT_ITALIC, DWORD, hDC, HDC(), m_dwFontFlags, m_dwFontHeight, m_dwTexHeight, m_dwTexWidth, m_fTextScale, m_pd3dDevice, and NULL.

HRESULT CD3DFont::InvalidateDeviceObjects void   ) 
 

Definition at line 404 of file d3dfont8.cxx.

References m_pd3dDevice, m_pVB, and NULL.

HRESULT CD3DFont::RestoreDeviceObjects void   ) 
 

Definition at line 335 of file d3dfont8.cxx.

References D3DERRORSTRING, and m_pd3dDevice.


Member Data Documentation

bool CD3DFont::m_bBeginText [private]
 

Definition at line 69 of file d3dfont8.h.

Referenced by BeginText().

DrawTextArgs CD3DFont::m_DTArgs[ MaxCalls ] [private]
 

Definition at line 65 of file d3dfont8.h.

DWORD CD3DFont::m_dwDrawTextStateBlock [private]
 

Definition at line 53 of file d3dfont8.h.

DWORD CD3DFont::m_dwFontFlags [private]
 

Definition at line 41 of file d3dfont8.h.

Referenced by InitDeviceObjects().

DWORD CD3DFont::m_dwFontHeight [private]
 

Definition at line 40 of file d3dfont8.h.

Referenced by InitDeviceObjects().

DWORD CD3DFont::m_dwSavedStateBlock [private]
 

Definition at line 52 of file d3dfont8.h.

DWORD CD3DFont::m_dwTexHeight [private]
 

Definition at line 47 of file d3dfont8.h.

Referenced by InitDeviceObjects().

DWORD CD3DFont::m_dwTexWidth [private]
 

Definition at line 46 of file d3dfont8.h.

Referenced by InitDeviceObjects().

FLOAT CD3DFont::m_fTexCoords[128-32][4] [private]
 

Definition at line 49 of file d3dfont8.h.

Referenced by GetTextExtent().

FLOAT CD3DFont::m_fTextScale [private]
 

Definition at line 48 of file d3dfont8.h.

Referenced by InitDeviceObjects().

UINT CD3DFont::m_nDeferedCalls [private]
 

Definition at line 68 of file d3dfont8.h.

Referenced by ClearBeginEndData().

LPDIRECT3DDEVICE8 CD3DFont::m_pd3dDevice [private]
 

Definition at line 43 of file d3dfont8.h.

Referenced by DeleteDeviceObjects(), DrawText(), DrawTextScaled(), EndText(), InitDeviceObjects(), InvalidateDeviceObjects(), and RestoreDeviceObjects().

char* CD3DFont::m_pTextBuffer [private]
 

Definition at line 67 of file d3dfont8.h.

Referenced by ClearBeginEndData().

LPDIRECT3DTEXTURE8 CD3DFont::m_pTexture [private]
 

Definition at line 44 of file d3dfont8.h.

LPDIRECT3DVERTEXBUFFER8 CD3DFont::m_pVB [private]
 

Definition at line 45 of file d3dfont8.h.

Referenced by InvalidateDeviceObjects().

TCHAR CD3DFont::m_strFontName[80] [private]
 

Definition at line 39 of file d3dfont8.h.

char CD3DFont::m_TextBuffer[ TextBufferLength ] [private]
 

Definition at line 66 of file d3dfont8.h.

Referenced by ClearBeginEndData().


The documentation for this class was generated from the following files:
Generated on Fri May 2 00:48:09 2003 for Panda by doxygen1.3