PEBL 2.2
Psychology Experiment Building Language - Cross-platform psychological experiment development system
FontTest.cpp File Reference
#include "../objects/PFont.h"
#include "../objects/PColor.h"
#include "../base/Variant.h"
#include <iostream>

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 40 of file FontTest.cpp.

41{
42
43 cout << "\n\n\n==========================================================\n";
44 cout << "Testing the PFont Class\n";
45 cout << "==========================================================\n";
46
47 cout << "==========================================================\n";
48 cout << "Constructing Colors\n";
49
50 PColor fgColor = PColor();
51 PColor bgColor = PColor(222,222,222,222);
52
53 cout << "\n\n\n==========================================================\n";
54 cout << "Constructing Fonts\n";
55 PFont myFont1 = PFont();
56 PFont myFont2 = PFont("VeraSe.ttf", PFS_Italic | PFS_Underline, 22, PColor("red"), PColor("black"), false );
57
58
59 cout << "\n\n==========================================================\n";
60 cout << "Printing standard font output." << endl;
61
62 cout << myFont1 << endl;
63 cout << myFont2 << endl;
64
65
66
67 cout << "\n\n==========================================================\n";
68 cout << "Printing font information:" << endl;
69
70
71 cout << "Font Name : " << myFont1.GetFontFileName() << endl;
72 cout << "Font Style: " << myFont1.GetFontStyle() << endl;
73 cout << " IsNormal? " << myFont1.IsNormalFont() << endl;
74 cout << " IsBold? " << myFont1.IsBoldFont() << endl;
75 cout << " IsItalic? " << myFont1.IsItalicFont() << endl;
76 cout << " IsUnderlined? " << myFont1.IsUnderlineFont() << endl;
77 cout << "AntiAliased? " << myFont1.GetAntiAliased() << endl;
78 cout << "FGColor: " << myFont1.GetFontColor() << endl;
79 cout << "BGColor: " << myFont1.GetBackgroundColor() << endl;
80 cout << "Font Size: " << myFont1.GetFontSize() << endl;
81
82
83
84 cout << "Finished" << endl;
85 return 0;
86}
@ PFS_Underline
Definition PFont.h:48
@ PFS_Italic
Definition PFont.h:47
Definition PFont.h:53
virtual PColor GetBackgroundColor() const
Definition PFont.cpp:296
virtual int GetFontStyle() const
Definition PFont.h:84
virtual bool IsItalicFont() const
Definition PFont.cpp:373
virtual PColor GetFontColor() const
Definition PFont.cpp:289
virtual std::string GetFontFileName() const
Definition PFont.h:83
virtual bool IsUnderlineFont() const
Definition PFont.cpp:379
virtual bool IsBoldFont() const
Definition PFont.cpp:367
virtual bool GetAntiAliased() const
Definition PFont.h:88
virtual int GetFontSize() const
Definition PFont.h:85
virtual bool IsNormalFont() const
Definition PFont.cpp:362

References PFont::GetAntiAliased(), PFont::GetBackgroundColor(), PFont::GetFontColor(), PFont::GetFontFileName(), PFont::GetFontSize(), PFont::GetFontStyle(), PFont::IsBoldFont(), PFont::IsItalicFont(), PFont::IsNormalFont(), PFont::IsUnderlineFont(), PFS_Italic, and PFS_Underline.