home *** CD-ROM | disk | FTP | other *** search
/ Computer Shopper 275 / DPCS0111DVD.ISO / Toolkit / Audio-Visual / VirtualDub / Source / VirtualDub-1.9.10-src.7z / src / Kasumi / h / uberblit_fill.h < prev    next >
Encoding:
C/C++ Source or Header  |  2009-09-14  |  953 b   |  56 lines

  1. #ifndef f_VD2_KASUMI_UBERBLIT_FILL_H
  2. #define f_VD2_KASUMI_UBERBLIT_FILL_H
  3.  
  4. #include "uberblit.h"
  5. #include "uberblit_base.h"
  6.  
  7. class VDPixmapGenFill8 : public IVDPixmapGen {
  8. public:
  9.     void Init(uint8 fill, uint32 bpr, sint32 width, sint32 height, uint32 type) {
  10.         mRow.resize(bpr, fill);
  11.         mWidth = width;
  12.         mHeight = height;
  13.         mType = type;
  14.     }
  15.  
  16.     void AddWindowRequest(int minY, int maxY) {
  17.     }
  18.  
  19.     void Start() {
  20.     }
  21.  
  22.     sint32 GetWidth(int) const {
  23.         return mWidth;
  24.     }
  25.  
  26.     sint32 GetHeight(int) const {
  27.         return mHeight;
  28.     }
  29.  
  30.     bool IsStateful() const {
  31.         return false;
  32.     }
  33.  
  34.     const void *GetRow(sint32 y, uint32 output) {
  35.         return mRow.data();
  36.     }
  37.  
  38.     void ProcessRow(void *dst, sint32 y) {
  39.         if (!mRow.empty())
  40.             memset(dst, mRow[0], mRow.size());
  41.     }
  42.  
  43.     uint32 GetType(uint32 index) const {
  44.         return mType;
  45.     }
  46.  
  47. protected:
  48.     sint32        mWidth;
  49.     sint32        mHeight;
  50.     uint32        mType;
  51.  
  52.     vdfastvector<uint8> mRow;
  53. };
  54.  
  55. #endif
  56.