Download | Plain Text | No Line Numbers


  1. /**
  2.  * @module cpixelformat_24
  3.  * @author Manuel Mausz, 0728348
  4.  * @brief Implementation of CPixelFormat handling 24bit color Windows Bitmaps.
  5.  * @date 18.04.2009
  6.  */
  7.  
  8. #ifndef CPIXELFORMAT_24_H
  9. #define CPIXELFORMAT_24_H
  10.  
  11. #include <fstream>
  12. #include "cpixelformat.h"
  13.  
  14. /**
  15.  * @class CPixelFormat_24
  16.  * @brief Implementation of CPixelFormat handling 24bit color Windows Bitmaps.
  17.  *
  18.  * On error CPixelFormat::PixelFormatError is thrown.
  19.  */
  20. class CPixelFormat_24 : public CPixelFormat
  21. {
  22. public:
  23. /**
  24.   * @method CPixelFormat_24
  25.   * @brief Default ctor
  26.   * @param bitmap pointer to CBitmap instance
  27.   * @return -
  28.   * @globalvars none
  29.   * @exception none
  30.   * @conditions none
  31.   */
  32. CPixelFormat_24(CBitmap *bitmap)
  33. : CPixelFormat(bitmap)
  34. {}
  35.  
  36. /**
  37.   * @method ~CPixelFormat_24
  38.   * @brief Default dtor
  39.   * @param -
  40.   * @return -
  41.   * @globalvars none
  42.   * @exception none
  43.   * @conditions none
  44.   */
  45. ~CPixelFormat_24()
  46. {}
  47.  
  48. /**
  49.   * @method setPixel
  50.   * @brief Modifies pixel at coordinates x, y
  51.   * @param pixel pointer to new pixel data
  52.   * @param x x-coordinate
  53.   * @param y y-coordinate
  54.   * @return -
  55.   * @globalvars none
  56.   * @exception PixelFormatError
  57.   * @conditions none
  58.   */
  59. void setPixel(const uint32_t *pixel, uint32_t x, uint32_t y);
  60.  
  61. /**
  62.   * @method getBitCount
  63.   * @brief returns color bitcount supported by this class
  64.   * @param -
  65.   * @return color bitcount supported by this class
  66.   * @globalvars none
  67.   * @exception none
  68.   * @conditions none
  69.   */
  70. uint32_t getBitCount()
  71. {
  72. return 24;
  73. }
  74. };
  75.  
  76. #endif
  77.  
  78. /* vim: set et sw=2 ts=2: */
  79.