From bcadfa267f976fe9f29afa50a635cbe3ea174e38 Mon Sep 17 00:00:00 2001 From: manuel Date: Sat, 2 May 2009 16:44:53 +0200 Subject: - colortable now uses uint32_t as identifier - rewrote xpm colortable parsing to convert their identifiers to our own and vica vi - implemented indexed8::setpixel/getpixel - moved rowsize to member variable in cbitmap - added second test for xpm/indexed8 --- ue2/imgsynth2/cbitmap.h | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) (limited to 'ue2/imgsynth2/cbitmap.h') diff --git a/ue2/imgsynth2/cbitmap.h b/ue2/imgsynth2/cbitmap.h index f48ada7..785e2f1 100644 --- a/ue2/imgsynth2/cbitmap.h +++ b/ue2/imgsynth2/cbitmap.h @@ -36,7 +36,7 @@ class CBitmap : public CFile * @conditions none */ CBitmap() - : m_pixeldata(NULL), m_pixelformat(NULL) + : m_pixeldata(NULL), m_pixelformat(NULL), m_rowsize(0) {} @@ -90,6 +90,34 @@ class CBitmap : public CFile return m_pixeldata; } + /** + * @method getColorTable + * @brief Returns reference to colortable + * @param - + * @return reference to colortable + * @globalvars none + * @exception none + * @conditions none + */ + std::map& getColorTable() + { + return m_colortable; + } + + /** + * @method getRowSize + * @brief Returns number of bytes of one row + * @param - + * @return number of bytes of one row + * @globalvars none + * @exception none + * @conditions none + */ + uint32_t getRowSize() + { + return m_rowsize; + } + /** * @method getPixelDataSize * @brief Return size of pixelbuffer @@ -230,11 +258,13 @@ class CBitmap : public CFile /** pointer to pixelbuffer */ uint8_t *m_pixeldata; /** colortable map */ - std::map m_colortable; + std::map m_colortable; /** set of supported PixelFormat handlers */ std::set m_handlers; /** pointer to CPixelFormat implementation */ CPixelFormat *m_pixelformat; + /** number of bytes of one row in the image */ + uint32_t m_rowsize; }; #endif -- cgit v1.2.3