00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef INCL_PLPIXEL8
00012 #define INCL_PLPIXEL8
00013
00014 #include "plpixeldefs.h"
00015
00016
00017
00018
00019 class PLPixel8
00020 {
00021 public:
00022
00023 PLPixel8 ();
00024
00025 PLPixel8 (PLBYTE val);
00026
00027 void Set (PLBYTE val);
00028
00029 PLBYTE Get () const;
00030
00031
00032 bool operator ==(const PLPixel8&);
00033
00034
00035 bool operator !=(const PLPixel8&);
00036
00037
00038 int BoxDist (PLPixel8 Pix);
00039
00040 private:
00041 PLBYTE m_Data;
00042 };
00043
00044 inline PLPixel8::PLPixel8()
00045 {
00046 }
00047
00048
00049 inline PLPixel8::PLPixel8(PLBYTE val)
00050 {
00051 Set (val);
00052 }
00053
00054
00055 inline void PLPixel8::Set(PLBYTE val)
00056 {
00057 m_Data = val;
00058 }
00059
00060
00061 inline PLBYTE PLPixel8::Get() const
00062 {
00063 return m_Data;
00064 }
00065
00066
00067 inline int PLPixel8::BoxDist (PLPixel8 Pix)
00068 {
00069 return abs ((int)Get()-Pix.Get());
00070 }
00071
00072 inline bool PLPixel8::operator ==(const PLPixel8& Pix)
00073 {
00074 return (Get() == Pix.Get());
00075 }
00076
00077 inline bool PLPixel8::operator !=(const PLPixel8& Pix)
00078 {
00079 return (!(*this == Pix));
00080 }
00081
00082
00083 #endif
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103