Revision: 1.5 - (view) (download) (as text)
1 : | ktanaka | 1.2 | #ifndef _PAT_MATCH_H |
2 : | #define _PAT_MATCH_H | ||
3 : | |||
4 : | ktanaka | 1.1 | #include <string> |
5 : | ktanaka | 1.4 | #include <iostream> |
6 : | ktanaka | 1.1 | #include "BitmapFont.h" |
7 : | #include "Assumption.h" | ||
8 : | ktanaka | 1.4 | #include <vector> |
9 : | ktanaka | 1.1 | |
10 : | /* @ : 黒 */ | ||
11 : | /* . : 白 */ | ||
12 : | /* else(?) : どちらでも */ | ||
13 : | class PatMatch{ | ||
14 : | ktanaka | 1.4 | friend std::ostream& operator<<(std::ostream &os,const PatMatch &pm); |
15 : | ktanaka | 1.2 | protected: |
16 : | ktanaka | 1.1 | int width, height; |
17 : | ktanaka | 1.4 | std::string pat; |
18 : | ktanaka | 1.1 | Assumption assumption; |
19 : | public: | ||
20 : | ktanaka | 1.5 | PatMatch(int w,int h,std::string s,const Assumption &as); |
21 : | PatMatch(int w,int h,std::string s, const SimpleAssumption &sa); | ||
22 : | int get(int x,int y) const; | ||
23 : | ktanaka | 1.4 | #if 0 |
24 : | ktanaka | 1.5 | bool isMatch(const BitmapFont& bf, int x, int y) const; |
25 : | ktanaka | 1.4 | #endif |
26 : | ktanaka | 1.5 | int matchPenalty(const BitmapFont& bf, int x, int y) const; |
27 : | std::vector<pixel> getPixels(int x, int y) const; | ||
28 : | ktanaka | 1.1 | }; |
29 : | ktanaka | 1.5 | std::ostream& operator<<(std::ostream &os,const PatMatch &pm); |
30 : | ktanaka | 1.2 | #endif /* _PAT_MATCH_H */ |
ktanaka Powered by ViewCVS 1.0-dev |
ViewCVS and CVS Help |