[wadalabfont-kit] / jis2prim / MatchersTest.cc  

View of /jis2prim/MatchersTest.cc

Parent Directory | Revision Log
Revision: 1.1 - (download) (as text) (annotate)
Tue Aug 20 11:10:36 2002 UTC (22 years, 3 months ago) by ktanaka
Branch: MAIN
CVS Tags: SNAP-20040518, SNAP-20030702, SNAP-20030630, SNAP-20030624, HEAD
*** empty log message ***
#include "BitmapFontFile.h"
#include "MatchersTest.h"

void MatchersTest::setUp(){
    a=new BitmapFont(24,24,"000006FFFFFF00C30000C30000C30000C30020C30C3FFFFE30C30C30C30C30C30C30C30C30C30C30C30C3FFFFC30C30C00C30000C30000C30000C30000C30000C306FFFFFF000000");
    mat=new Matchers();
    ff=new BitmapFontFile("jiskan24.bdf");
}

void MatchersTest::tearDown(){
  delete a; delete mat;
  delete ff;
}

void MatchersTest::testShow(){
  std::cout << *mat << '\n';
}

void MatchersTest::testMatch(){
#if 0
  std::vector<MatchResult> mr=mat->findMatch(*a);
  std::vector<MatchResult>::iterator it;
  for(it=mr.begin();it!=mr.end();it++)
    std::cout << *it << '\n';
#endif
}

void MatchersTest::testCover(){
#if 0
  for(int code=0x3021;code<=0x307e;code++){
    BitmapFont bf=ff->find(code);
    std::vector<pixel> nc=mat->notCovered(bf);
    if(!nc.empty()){
      std::cout << "---------------------------------------\n";
      std::cout << bf;
      std::cout << BitmapFont(bf.getWidth(),bf.getHeight(),nc) ;
    }
  }
#endif
}


ktanaka

Powered by ViewCVS 1.0-dev

ViewCVS and CVS Help