Revision Log
Revision: 1.1 - (view) (download) (as text)
| 1 : | ktanaka | 1.1 | #include "BitmapFontFile.h" |
| 2 : | #include "MatchersTest.h" | ||
| 3 : | |||
| 4 : | void MatchersTest::setUp(){ | ||
| 5 : | a=new BitmapFont(24,24,"000006FFFFFF00C30000C30000C30000C30020C30C3FFFFE30C30C30C30C30C30C30C30C30C30C30C30C3FFFFC30C30C00C30000C30000C30000C30000C30000C306FFFFFF000000"); | ||
| 6 : | mat=new Matchers(); | ||
| 7 : | ff=new BitmapFontFile("jiskan24.bdf"); | ||
| 8 : | } | ||
| 9 : | |||
| 10 : | void MatchersTest::tearDown(){ | ||
| 11 : | delete a; delete mat; | ||
| 12 : | delete ff; | ||
| 13 : | } | ||
| 14 : | |||
| 15 : | void MatchersTest::testShow(){ | ||
| 16 : | std::cout << *mat << '\n'; | ||
| 17 : | } | ||
| 18 : | |||
| 19 : | void MatchersTest::testMatch(){ | ||
| 20 : | #if 0 | ||
| 21 : | std::vector<MatchResult> mr=mat->findMatch(*a); | ||
| 22 : | std::vector<MatchResult>::iterator it; | ||
| 23 : | for(it=mr.begin();it!=mr.end();it++) | ||
| 24 : | std::cout << *it << '\n'; | ||
| 25 : | #endif | ||
| 26 : | } | ||
| 27 : | |||
| 28 : | void MatchersTest::testCover(){ | ||
| 29 : | #if 0 | ||
| 30 : | for(int code=0x3021;code<=0x307e;code++){ | ||
| 31 : | BitmapFont bf=ff->find(code); | ||
| 32 : | std::vector<pixel> nc=mat->notCovered(bf); | ||
| 33 : | if(!nc.empty()){ | ||
| 34 : | std::cout << "---------------------------------------\n"; | ||
| 35 : | std::cout << bf; | ||
| 36 : | std::cout << BitmapFont(bf.getWidth(),bf.getHeight(),nc) ; | ||
| 37 : | } | ||
| 38 : | } | ||
| 39 : | #endif | ||
| 40 : | } | ||
| 41 : |
|
ktanaka Powered by ViewCVS 1.0-dev |
ViewCVS and CVS Help |