ReactOS 0.4.15-dev-7788-g1ad9096
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 {
882 status = DllExports::GdipCreateFont(family->fontFamily, emSize, style, unit, &font);
883 }
Arabic default style
Definition: afstyles.h:94
GpFontFamily * fontFamily
Definition: mk_font.cpp:20
png_const_structrp png_const_inforp int * unit
Definition: png.h:2159
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 {
891 status = DllExports::GdipCreateFontFromLogfontA(hdc, logfont, &font);
892 }
HDC hdc
Definition: main.c:9

◆ Font() [4/7]

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

Definition at line 894 of file gdiplusheaders.h.

895 {
896 status = DllExports::GdipCreateFontFromLogfontW(hdc, logfont, &font);
897 }

◆ 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 {
905 status = DllExports::GdipCreateFontFromDC(hdc, &font);
906 }

◆ 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 }
GpFont * font
Status status
#define NULL
Definition: types.h:112

◆ 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 }
Status SetStatus(Status status) const

◆ 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 }
friend GpFont *& getNat(const Font *font)
float REAL
Definition: types.h:41
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546

◆ GetHeight() [2/2]

REAL Font::GetHeight ( REAL  dpi) const
inline

Definition at line 931 of file gdiplusheaders.h.

932 {
933 REAL height;
934 SetStatus(DllExports::GdipGetFontHeightGivenDPI(font, dpi, &height));
935 return height;
936 }
#define dpi
Definition: sysparams.c:23

◆ GetLastStatus()

Status Font::GetLastStatus ( ) const
inline

Definition at line 939 of file gdiplusheaders.h.

940 {
941 return status;
942 }

◆ 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 }
GLboolean GLboolean g
Definition: glext.h:6204

◆ 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 }

◆ GetSize()

REAL Font::GetSize ( ) const
inline

Definition at line 957 of file gdiplusheaders.h.

958 {
959 REAL size;
960 SetStatus(DllExports::GdipGetFontSize(font, &size));
961 return size;
962 }
GLsizeiptr size
Definition: glext.h:5919

◆ GetStyle()

INT Font::GetStyle ( ) const
inline

Definition at line 965 of file gdiplusheaders.h.

966 {
967 INT style;
968 SetStatus(DllExports::GdipGetFontStyle(font, &style));
969 return style;
970 }
int32_t INT
Definition: typedefs.h:58

◆ GetUnit()

Unit Font::GetUnit ( ) const
inline

Definition at line 973 of file gdiplusheaders.h.

974 {
975 Unit unit;
976 SetStatus(DllExports::GdipGetFontUnit(font, &unit));
977 return unit;
978 }
Unit
Definition: gdiplusenums.h:26

◆ IsAvailable()

BOOL Font::IsAvailable ( ) const
inline

Definition at line 981 of file gdiplusheaders.h.

982 {
983 return FALSE;
984 }
#define FALSE
Definition: types.h:117

◆ 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 }
@ Ok
Definition: gdiplustypes.h:26

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 }

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: