RgbaImage.inl

Go to the documentation of this file.
00001 /**<!-------------------------------------------------------------------->
00002    @file   RgbaImage.inl
00003    @author Travis Fischer (fisch0920@gmail.com)
00004    @date   January 2008
00005    
00006    @brief
00007      Image class supporting a standard 32-bit Rgba pixel format
00008    <!-------------------------------------------------------------------->**/
00009 
00010 #ifndef MILTON_RGBA_IMAGE_INL_
00011 #define MILTON_RGBA_IMAGE_INL_
00012 
00013 inline RgbaImage::RgbaImage(unsigned width, unsigned height)
00014    : Image(width, height), m_data(NULL), m_ownData(false)
00015 {
00016    m_data = new Rgba32[m_size];
00017 }
00018 
00019 inline Rgba32 *RgbaImage::operator[](unsigned index) {
00020    ASSERT(index < m_height);
00021    
00022    return m_data + index * m_width;
00023 }
00024 
00025 inline const Rgba32 *RgbaImage::operator[](unsigned index) const {
00026    ASSERT(index < m_height);
00027    
00028    return m_data + index * m_width;
00029 }
00030 
00031 inline Rgba32 *RgbaImage::getData() {
00032    return m_data;
00033 }
00034 
00035 inline const Rgba32 *RgbaImage::getData() const {
00036    return m_data;
00037 }
00038 
00039 #endif // MILTON_RGBA_IMAGE_INL_
00040 

Generated on 28 Feb 2009 for Milton by doxygen 1.5.6