00001
00017 #ifndef INC_MI32_MG2MEM1S_H
00018 #define INC_MI32_MG2MEM1S_H
00019
00020 #ifndef INC_MI32_MD2BINARY_H
00021 #include <mi32/mg2binary.h>
00022 #endif
00023
00024 #ifndef INC_MI32_BITSETD_H
00025 #include <mi32/bitset.h>
00026 #endif
00027
00028
00029 namespace MGD {
00030
00036 class DEVICE_MEM1_SPARSE : public MGD::DEVICE_BINARY {
00037 public:
00038
00039 class CONTEXT : public MGD::DEVICE_BINARY::CONTEXT {
00040 public:
00042 virtual ~CONTEXT ();
00043
00044 protected:
00046 CONTEXT (
00047 MGD::DEVICE_MEM1_SPARSE *pDevice
00048 );
00049
00050 private:
00051 #ifndef GENERATING_DOXYGEN_OUTPUT
00052 typedef DEVICE_BINARY::CONTEXT BASECLASS;
00053
00054 CONTEXT (const CONTEXT&);
00055 CONTEXT& operator= (const CONTEXT&);
00056
00057 friend class MGD::DEVICE_MEM1_SPARSE;
00058
00059 virtual ERRVALUE v_PutPixel (INT32 x, INT32 y, MGD::PIXEL pixel);
00060 #endif // GENERATING_DOXYGEN_OUTPUT
00061 };
00062
00064 DEVICE_MEM1_SPARSE ();
00065
00067 virtual ~DEVICE_MEM1_SPARSE();
00068
00069 ERRVALUE Create (
00070 INT32 height,
00071 INT32 width,
00072 bool StartValue = false
00073 );
00074
00075 private:
00076 #ifndef GENERATING_DOXYGEN_OUTPUT
00077 DEVICE_MEM1_SPARSE (const DEVICE_MEM1_SPARSE&);
00078 DEVICE_MEM1_SPARSE& operator= (const DEVICE_MEM1_SPARSE&);
00079
00080 BITSET m_RowConstVal;
00081 SIMPLE_ARRAY<BITSET*> m_RowBits;
00082 UINT32 m_width;
00083
00084
00085 virtual MGD::CONTEXT* v_CreateContext ();
00086 virtual ERRVALUE v_FillSpan (MGD::CONTEXT *gc, INT32 x1, INT32 x2, INT32 y);
00087
00088 bool v_GetRange (INT32 x, INT32 y, INT32 x2, INT32& endx) const;
00089 bool v_GetValue (INT32 x, INT32 y) const;
00090 void v_SetAll (bool value = true);
00091 #endif // GENERATING_DOXYGEN_OUTPUT
00092 };
00093
00094
00095 }
00096
00097 #endif // INC_MI32_MG2MEM1S_H