Main Page   Namespace List   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 29 of file d3dfont8.h.


Constructor & Destructor Documentation

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

Definition at line 45 of file d3dfont8.cxx.

References ClearBeginEndData(), m_bBeginText, m_dwDrawTextStateBlock, m_dwFontFlags, m_dwFontHeight, m_dwSavedStateBlock, m_pd3dDevice, m_pTexture, m_pVB, m_strFontName, and NULL.

CD3DFont::~CD3DFont  ) 
 

Definition at line 65 of file d3dfont8.cxx.

References DeleteDeviceObjects().


Member Function Documentation

HRESULT CD3DFont::BeginText void   ) 
 

Definition at line 556 of file d3dfont8.cxx.

References ClearBeginEndData(), and m_bBeginText.

Referenced by DrawText(), and DrawTextScaled().

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

Definition at line 550 of file d3dfont8.cxx.

References m_nDeferedCalls, m_pTextBuffer, and m_TextBuffer.

Referenced by BeginText(), CD3DFont(), and EndText().

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 579 of file d3dfont8.cxx.

References x, y, and z.

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

Definition at line 572 of file d3dfont8.cxx.

References 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 564 of file d3dfont8.cxx.

References x, y, and z.

Referenced by DrawTextScaled().

HRESULT CD3DFont::DeleteDeviceObjects void   ) 
 

Definition at line 447 of file d3dfont8.cxx.

References InvalidateDeviceObjects(), m_pd3dDevice, m_pTexture, NULL, PRINT_REFCNT, and SAFE_RELEASE.

Referenced by ~CD3DFont().

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

Definition at line 531 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 508 of file d3dfont8.cxx.

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

HRESULT CD3DFont::EndText void   ) 
 

Definition at line 616 of file d3dfont8.cxx.

References c, ClearBeginEndData(), D3DERRORSTRING, D3DFONT_FILTERED, D3DFONT_ITALIC, D3DFVF_FONT2DVERTEX, InitFont2DVertex(), IS_VALID_PTR, m_bBeginText, CD3DFont::DrawTextArgs::m_bScaled, m_DTArgs, m_dwDrawTextStateBlock, CD3DFont::DrawTextArgs::m_dwFlags, m_dwFontFlags, m_dwSavedStateBlock, m_dwTexHeight, m_dwTexWidth, m_fTexCoords, m_fTextScale, m_nDeferedCalls, m_pd3dDevice, m_pVB, MAX_NUM_VERTICES, NULL, SAFE_RELEASE, w, x, y, and z.

Referenced by DrawText(), and DrawTextScaled().

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

Definition at line 466 of file d3dfont8.cxx.

References c, m_dwTexHeight, m_dwTexWidth, m_fTexCoords, and NULL.

HRESULT CD3DFont::InitDeviceObjects LPDIRECT3DDEVICE8  pd3dDevice  ) 
 

Definition at line 74 of file d3dfont8.cxx.

References c, D3DERRORSTRING, D3DFONT_BOLD, D3DFONT_ITALIC, hDC, HDC(), m_dwFontFlags, m_dwFontHeight, m_dwTexHeight, m_dwTexWidth, m_fTexCoords, m_fTextScale, m_pd3dDevice, m_pTexture, m_strFontName, NULL, RestoreDeviceObjects(), VOID(), x, and y.

HRESULT CD3DFont::InvalidateDeviceObjects void   ) 
 

Definition at line 403 of file d3dfont8.cxx.

References IS_VALID_PTR, m_dwDrawTextStateBlock, m_dwSavedStateBlock, m_pd3dDevice, m_pVB, NULL, PRINT_REFCNT, RELEASE, RELEASE_ONCE, and SAFE_RELEASE.

Referenced by DeleteDeviceObjects().

HRESULT CD3DFont::RestoreDeviceObjects void   ) 
 

Definition at line 334 of file d3dfont8.cxx.

References D3DERRORSTRING, D3DFONT_ZENABLE, m_dwDrawTextStateBlock, m_dwFontFlags, m_dwSavedStateBlock, m_pd3dDevice, m_pTexture, m_pVB, MAX_NUM_VERTICES, and PRINT_REFCNT.

Referenced by InitDeviceObjects().


Member Data Documentation

bool CD3DFont::m_bBeginText [private]
 

Definition at line 68 of file d3dfont8.h.

Referenced by BeginText(), CD3DFont(), and EndText().

DrawTextArgs CD3DFont::m_DTArgs[ MaxCalls ] [private]
 

Definition at line 64 of file d3dfont8.h.

Referenced by EndText().

DWORD CD3DFont::m_dwDrawTextStateBlock [private]
 

Definition at line 52 of file d3dfont8.h.

Referenced by CD3DFont(), EndText(), InvalidateDeviceObjects(), and RestoreDeviceObjects().

DWORD CD3DFont::m_dwFontFlags [private]
 

Definition at line 40 of file d3dfont8.h.

Referenced by CD3DFont(), EndText(), InitDeviceObjects(), and RestoreDeviceObjects().

DWORD CD3DFont::m_dwFontHeight [private]
 

Definition at line 39 of file d3dfont8.h.

Referenced by CD3DFont(), and InitDeviceObjects().

DWORD CD3DFont::m_dwSavedStateBlock [private]
 

Definition at line 51 of file d3dfont8.h.

Referenced by CD3DFont(), EndText(), InvalidateDeviceObjects(), and RestoreDeviceObjects().

DWORD CD3DFont::m_dwTexHeight [private]
 

Definition at line 46 of file d3dfont8.h.

Referenced by EndText(), GetTextExtent(), and InitDeviceObjects().

DWORD CD3DFont::m_dwTexWidth [private]
 

Definition at line 45 of file d3dfont8.h.

Referenced by EndText(), GetTextExtent(), and InitDeviceObjects().

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

Definition at line 48 of file d3dfont8.h.

Referenced by EndText(), GetTextExtent(), and InitDeviceObjects().

FLOAT CD3DFont::m_fTextScale [private]
 

Definition at line 47 of file d3dfont8.h.

Referenced by EndText(), and InitDeviceObjects().

UINT CD3DFont::m_nDeferedCalls [private]
 

Definition at line 67 of file d3dfont8.h.

Referenced by ClearBeginEndData(), and EndText().

LPDIRECT3DDEVICE8 CD3DFont::m_pd3dDevice [private]
 

Definition at line 42 of file d3dfont8.h.

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

char* CD3DFont::m_pTextBuffer [private]
 

Definition at line 66 of file d3dfont8.h.

Referenced by ClearBeginEndData().

LPDIRECT3DTEXTURE8 CD3DFont::m_pTexture [private]
 

Definition at line 43 of file d3dfont8.h.

Referenced by CD3DFont(), DeleteDeviceObjects(), InitDeviceObjects(), and RestoreDeviceObjects().

LPDIRECT3DVERTEXBUFFER8 CD3DFont::m_pVB [private]
 

Definition at line 44 of file d3dfont8.h.

Referenced by CD3DFont(), EndText(), InvalidateDeviceObjects(), and RestoreDeviceObjects().

TCHAR CD3DFont::m_strFontName[80] [private]
 

Definition at line 38 of file d3dfont8.h.

Referenced by CD3DFont(), and InitDeviceObjects().

char CD3DFont::m_TextBuffer[ TextBufferLength ] [private]
 

Definition at line 65 of file d3dfont8.h.

Referenced by ClearBeginEndData().


The documentation for this class was generated from the following files:
Generated on Fri Apr 18 00:11:29 2003 for Panda by doxygen1.3