00001 /* centering3x3.h 00002 */ 00003 #ifndef _CENTERING3X3_H 00004 #define _CENTERING3X3_H 00005 00006 #include "osl/position.h" 00007 #include "osl/misc/carray.h" 00008 00009 namespace osl 00010 { 00014 struct Centering3x3 00015 { 00016 struct Table 00017 { 00018 CArray<Position,Position::SIZE> centers; 00019 Table(); 00020 }; 00021 static const Position adjustCenterNaive(Position); 00022 static const Table table; 00023 static const Position adjustCenter(Position src) 00024 { 00025 return table.centers[src.index()]; 00026 } 00027 }; 00028 00029 } // namespace osl 00030 00031 #endif /* _CENTERING3X3_H */ 00032 // ;;; Local Variables: 00033 // ;;; mode:c++ 00034 // ;;; c-basic-offset:2 00035 // ;;; End: