ReactOS  0.4.14-dev-50-g13bb5e2
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 (VOID) const
 
Status GetFamily (FontFamily *family) const
 
REAL GetHeight (const Graphics *graphics) const
 
REAL GetHeight (REAL dpi) const
 
Status GetLastStatus (VOID) const
 
Status GetLogFontA (const Graphics *g, LOGFONTA *logfontA) const
 
Status GetLogFontW (const Graphics *g, LOGFONTW *logfontW) const
 
REAL GetSize (VOID) const
 
INT GetStyle (VOID) const
 
Unit GetUnit (VOID) const
 
BOOL IsAvailable (VOID) 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
 

Detailed Description

Definition at line 639 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 646 of file gdiplusheaders.h.

647  {
649  }
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 651 of file gdiplusheaders.h.

652  {
653  }

◆ Font() [3/7]

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

Definition at line 655 of file gdiplusheaders.h.

656  {
658  }
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 660 of file gdiplusheaders.h.

661  {
663  }
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 665 of file gdiplusheaders.h.

666  {
667  }

◆ Font() [6/7]

Font::Font ( HDC  hdc)
inline

Definition at line 669 of file gdiplusheaders.h.

670  {
672  }
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 742 of file gdiplusheaders.h.

743  {
744  }

Referenced by Clone().

Member Function Documentation

◆ Clone()

Font* Font::Clone ( VOID  ) const
inline

Definition at line 674 of file gdiplusheaders.h.

675  {
676  Font *cloneFont = new Font();
677  cloneFont->status = DllExports::GdipCloneFont(font, cloneFont ? &cloneFont->font : NULL);
678  return cloneFont;
679  }
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 681 of file gdiplusheaders.h.

682  {
683  return SetStatus(DllExports::GdipGetFamily(font, family ? &family->fontFamily : NULL));
684  }
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 686 of file gdiplusheaders.h.

687  {
688  REAL height;
689  SetStatus(DllExports::GdipGetFontHeight(font, graphics ? graphics->graphics : NULL, &height));
690  return height;
691  }
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
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
GpGraphics * graphics
float REAL
Definition: types.h:41

◆ GetHeight() [2/2]

REAL Font::GetHeight ( REAL  dpi) const
inline

Definition at line 693 of file gdiplusheaders.h.

694  {
695  REAL height;
697  return height;
698  }
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 ( VOID  ) const
inline

Definition at line 700 of file gdiplusheaders.h.

701  {
702  return status;
703  }
Status status

◆ GetLogFontA()

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

Definition at line 705 of file gdiplusheaders.h.

706  {
707  return SetStatus(DllExports::GdipGetLogFontA(font, g ? g->graphics : NULL, logfontA));
708  }
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

◆ GetLogFontW()

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

Definition at line 710 of file gdiplusheaders.h.

711  {
712  return SetStatus(DllExports::GdipGetLogFontW(font, g ? g->graphics : NULL, logfontW));
713  }
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

◆ GetSize()

REAL Font::GetSize ( VOID  ) const
inline

Definition at line 715 of file gdiplusheaders.h.

716  {
717  REAL size;
719  return size;
720  }
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 ( VOID  ) const
inline

Definition at line 722 of file gdiplusheaders.h.

723  {
724  INT style;
726  return style;
727  }
Definition: mk_font.cpp:20
int32_t INT
Definition: typedefs.h:56
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 ( VOID  ) const
inline

Definition at line 729 of file gdiplusheaders.h.

730  {
731  Unit unit;
733  return unit;
734  }
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 ( VOID  ) const
inline

Definition at line 736 of file gdiplusheaders.h.

737  {
738  return FALSE;
739  }

◆ SetStatus()

Status Font::SetStatus ( Status  status) const
inlineprivate

Definition at line 750 of file gdiplusheaders.h.

751  {
752  if (status == Ok)
753  return status;
754  this->status = status;
755  return status;
756  }
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 643 of file gdiplusheaders.h.

◆ FontFamily

friend class FontFamily
friend

Definition at line 642 of file gdiplusheaders.h.

◆ Graphics

friend class Graphics
friend

Definition at line 644 of file gdiplusheaders.h.

Member Data Documentation

◆ font

GpFont* Font::font
private

Definition at line 748 of file gdiplusheaders.h.

Referenced by Clone().

◆ status

Status Font::status
mutableprivate

Definition at line 747 of file gdiplusheaders.h.

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


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