ReactOS  0.4.15-dev-484-g89e716a7
Font Class Reference

#include <gdiplusheaders.h>

Inheritance diagram for Font:
Collaboration diagram for Font:

Public Member Functions

 Font (const FontFamily *family, REAL emSize, INT style, Unit unit)
 
 Font (HDC hdc, const HFONT hfont)
 
 Font (HDC hdc, const LOGFONTA *logfont)
 
 Font (HDC hdc, const LOGFONTW *logfont)
 
 Font (const WCHAR *familyName, REAL emSize, INT style, Unit unit, const FontCollection *fontCollection)
 
 Font (HDC hdc)
 
FontClone () const
 
Status GetFamily (FontFamily *family) const
 
REAL GetHeight (const Graphics *graphics) const
 
REAL GetHeight (REAL dpi) const
 
Status GetLastStatus () const
 
Status GetLogFontA (const Graphics *g, LOGFONTA *logfontA) const
 
Status GetLogFontW (const Graphics *g, LOGFONTW *logfontW) const
 
REAL GetSize () const
 
INT GetStyle () const
 
Unit GetUnit () const
 
BOOL IsAvailable () const
 
- Public Member Functions inherited from GdiplusBase
void operator delete (void *in_pVoid)
 
void operator delete[] (void *in_pVoid)
 
voidoperator new (size_t in_size)
 
voidoperator new[] (size_t in_size)
 

Protected Member Functions

 Font ()
 

Private Member Functions

Status SetStatus (Status status) const
 

Private Attributes

Status status
 
GpFontfont
 

Friends

class FontFamily
 
class FontCollection
 
class Graphics
 
GpFont *& getNat (const Font *font)
 

Detailed Description

Definition at line 873 of file gdiplusheaders.h.

Constructor & Destructor Documentation

◆ Font() [1/7]

Font::Font ( const FontFamily family,
REAL  emSize,
INT  style,
Unit  unit 
)
inline

Definition at line 880 of file gdiplusheaders.h.

881  {
883  }
Definition: mk_font.cpp:20
GpFontFamily * fontFamily
GpStatus WINGDIPAPI GdipCreateFont(GDIPCONST GpFontFamily *fontFamily, REAL emSize, INT style, Unit unit, GpFont **font)
Definition: font.c:144
png_const_structrp png_const_inforp int * unit
Definition: png.h:2161
Arabic default style
Definition: afstyles.h:93
Definition: ps.c:97

◆ Font() [2/7]

Font::Font ( HDC  hdc,
const HFONT  hfont 
)
inline

Definition at line 885 of file gdiplusheaders.h.

886  {
887  }

◆ Font() [3/7]

Font::Font ( HDC  hdc,
const LOGFONTA logfont 
)
inline

Definition at line 889 of file gdiplusheaders.h.

890  {
892  }
Definition: mk_font.cpp:20
GpStatus WINGDIPAPI GdipCreateFontFromLogfontA(HDC hdc, GDIPCONST LOGFONTA *lfa, GpFont **font)
Definition: font.c:249
HDC hdc
Definition: main.c:9
Definition: ps.c:97

◆ Font() [4/7]

Font::Font ( HDC  hdc,
const LOGFONTW logfont 
)
inline

Definition at line 894 of file gdiplusheaders.h.

895  {
897  }
GpStatus WINGDIPAPI GdipCreateFontFromLogfontW(HDC hdc, GDIPCONST LOGFONTW *logfont, GpFont **font)
Definition: font.c:203
Definition: mk_font.cpp:20
HDC hdc
Definition: main.c:9
Definition: ps.c:97

◆ Font() [5/7]

Font::Font ( const WCHAR familyName,
REAL  emSize,
INT  style,
Unit  unit,
const FontCollection fontCollection 
)
inline

Definition at line 899 of file gdiplusheaders.h.

900  {
901  }

◆ Font() [6/7]

Font::Font ( HDC  hdc)
inline

Definition at line 903 of file gdiplusheaders.h.

904  {
906  }
GpStatus WINGDIPAPI GdipCreateFontFromDC(HDC hdc, GpFont **font)
Definition: font.c:286
Definition: mk_font.cpp:20
HDC hdc
Definition: main.c:9
Definition: ps.c:97

◆ Font() [7/7]

Font::Font ( )
inlineprotected

Definition at line 987 of file gdiplusheaders.h.

988  {
989  }

Referenced by Clone().

Member Function Documentation

◆ Clone()

Font* Font::Clone ( ) const
inline

Definition at line 909 of file gdiplusheaders.h.

910  {
911  Font *cloneFont = new Font();
912  cloneFont->status = DllExports::GdipCloneFont(font, cloneFont ? &cloneFont->font : NULL);
913  return cloneFont;
914  }
Definition: mk_font.cpp:20
Status status
smooth NULL
Definition: ftsmooth.c:416
GpStatus WINGDIPAPI GdipCloneFont(GpFont *font, GpFont **cloneFont)
Definition: font.c:520
GpFont * font

◆ GetFamily()

Status Font::GetFamily ( FontFamily family) const
inline

Definition at line 917 of file gdiplusheaders.h.

918  {
919  return SetStatus(DllExports::GdipGetFamily(font, family ? &family->fontFamily : NULL));
920  }
Definition: mk_font.cpp:20
GpFontFamily * fontFamily
smooth NULL
Definition: ftsmooth.c:416
Status SetStatus(Status status) const
GpStatus WINGDIPAPI GdipGetFamily(GpFont *font, GpFontFamily **family)
Definition: font.c:319

◆ GetHeight() [1/2]

REAL Font::GetHeight ( const Graphics graphics) const
inline

Definition at line 923 of file gdiplusheaders.h.

924  {
925  REAL height;
926  SetStatus(DllExports::GdipGetFontHeight(font, graphics ? getNat(graphics) : NULL, &height));
927  return height;
928  }
Definition: mk_font.cpp:20
smooth NULL
Definition: ftsmooth.c:416
Status SetStatus(Status status) const
GpStatus WINGDIPAPI GdipGetFontHeight(GDIPCONST GpFont *font, GDIPCONST GpGraphics *graphics, REAL *height)
Definition: font.c:552
friend GpFont *& getNat(const Font *font)
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
float REAL
Definition: types.h:41

◆ GetHeight() [2/2]

REAL Font::GetHeight ( REAL  dpi) const
inline

Definition at line 931 of file gdiplusheaders.h.

932  {
933  REAL height;
935  return height;
936  }
Definition: mk_font.cpp:20
Status SetStatus(Status status) const
#define dpi
Definition: sysparams.c:22
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
GpStatus WINGDIPAPI GdipGetFontHeightGivenDPI(GDIPCONST GpFont *font, REAL dpi, REAL *height)
Definition: font.c:599
float REAL
Definition: types.h:41

◆ GetLastStatus()

Status Font::GetLastStatus ( ) const
inline

Definition at line 939 of file gdiplusheaders.h.

940  {
941  return status;
942  }
Status status

◆ GetLogFontA()

Status Font::GetLogFontA ( const Graphics g,
LOGFONTA logfontA 
) const
inline

Definition at line 945 of file gdiplusheaders.h.

946  {
947  return SetStatus(DllExports::GdipGetLogFontA(font, g ? getNat(g) : NULL, logfontA));
948  }
Definition: mk_font.cpp:20
GpStatus WINGDIPAPI GdipGetLogFontA(GpFont *font, GpGraphics *graphics, LOGFONTA *lfa)
Definition: font.c:432
smooth NULL
Definition: ftsmooth.c:416
Status SetStatus(Status status) const
GLboolean GLboolean g
Definition: glext.h:6204
friend GpFont *& getNat(const Font *font)

◆ GetLogFontW()

Status Font::GetLogFontW ( const Graphics g,
LOGFONTW logfontW 
) const
inline

Definition at line 951 of file gdiplusheaders.h.

952  {
953  return SetStatus(DllExports::GdipGetLogFontW(font, g ? getNat(g) : NULL, logfontW));
954  }
GpStatus WINGDIPAPI GdipGetLogFontW(GpFont *font, GpGraphics *graphics, LOGFONTW *lf)
Definition: font.c:455
Definition: mk_font.cpp:20
smooth NULL
Definition: ftsmooth.c:416
Status SetStatus(Status status) const
GLboolean GLboolean g
Definition: glext.h:6204
friend GpFont *& getNat(const Font *font)

◆ GetSize()

REAL Font::GetSize ( void  ) const
inline

Definition at line 957 of file gdiplusheaders.h.

958  {
959  REAL size;
961  return size;
962  }
Definition: mk_font.cpp:20
GpStatus WINGDIPAPI GdipGetFontSize(GpFont *font, REAL *size)
Definition: font.c:350
Status SetStatus(Status status) const
GLsizeiptr size
Definition: glext.h:5919
float REAL
Definition: types.h:41

◆ GetStyle()

INT Font::GetStyle ( ) const
inline

Definition at line 965 of file gdiplusheaders.h.

966  {
967  INT style;
969  return style;
970  }
Definition: mk_font.cpp:20
int32_t INT
Definition: typedefs.h:57
Status SetStatus(Status status) const
GpStatus WINGDIPAPI GdipGetFontStyle(GpFont *font, INT *style)
Definition: font.c:393
Arabic default style
Definition: afstyles.h:93

◆ GetUnit()

Unit Font::GetUnit ( ) const
inline

Definition at line 973 of file gdiplusheaders.h.

974  {
975  Unit unit;
977  return unit;
978  }
Unit
Definition: gdiplusenums.h:25
Definition: mk_font.cpp:20
GpStatus WINGDIPAPI GdipGetFontUnit(GpFont *font, Unit *unit)
Definition: font.c:417
png_const_structrp png_const_inforp int * unit
Definition: png.h:2161
Status SetStatus(Status status) const

◆ IsAvailable()

BOOL Font::IsAvailable ( ) const
inline

Definition at line 981 of file gdiplusheaders.h.

982  {
983  return FALSE;
984  }

◆ SetStatus()

Status Font::SetStatus ( Status  status) const
inlineprivate

Definition at line 996 of file gdiplusheaders.h.

997  {
998  if (status == Ok)
999  return status;
1000  this->status = status;
1001  return status;
1002  }
Status status
Definition: ps.c:97

Referenced by GetFamily(), GetHeight(), GetLogFontA(), GetLogFontW(), GetSize(), GetStyle(), and GetUnit().

Friends And Related Function Documentation

◆ FontCollection

friend class FontCollection
friend

Definition at line 877 of file gdiplusheaders.h.

◆ FontFamily

friend class FontFamily
friend

Definition at line 876 of file gdiplusheaders.h.

◆ getNat

GpFont*& getNat ( const Font font)
friend

Definition at line 1006 of file gdiplusheaders.h.

1007  {
1008  return const_cast<Font *>(font)->font;
1009  }
Definition: mk_font.cpp:20

Referenced by GetHeight(), GetLogFontA(), and GetLogFontW().

◆ Graphics

friend class Graphics
friend

Definition at line 878 of file gdiplusheaders.h.

Member Data Documentation

◆ font

GpFont* Font::font
private

Definition at line 993 of file gdiplusheaders.h.

Referenced by Clone().

◆ status

Status Font::status
mutableprivate

Definition at line 992 of file gdiplusheaders.h.

Referenced by Clone(), GetLastStatus(), and SetStatus().


The documentation for this class was generated from the following file: