Main Page | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members

plfilterfill.h

00001 /*
00002 /--------------------------------------------------------------------
00003 |
00004 |      $Id: plfilterfill.h,v 1.6 2004/04/16 20:14:42 uzadow Exp $
00005 |
00006 \--------------------------------------------------------------------
00007 */
00008 
00009 #if !defined(INCL_PLFILTERFILL)
00010 #define INCL_PLFILTERFILL
00011 
00012 #if _MSC_VER > 1000
00013 #pragma once
00014 #endif // _MSC_VER > 1000
00015 
00016 #include "plfilter.h"
00017 #include "plfilterfillrect.h"
00018 
00019 class PLBmp;
00020 
00021 //! Filter that fills a bitmap with a color. Works for 8, 24 and 
00022 //! 32 bpp 
00023 template<class PixelC> class PLFilterFill : public PLFilter
00024 {
00025 public:
00026   PLFilterFill (const PixelC& Color);
00027   virtual ~PLFilterFill();
00028   virtual void ApplyInPlace(PLBmp *pBmp) const;
00029 
00030 private:
00031   PixelC m_Color;
00032 };
00033 
00034 template<class PixelC>
00035 PLFilterFill<PixelC>::PLFilterFill(const PixelC& Color)
00036     : m_Color (Color)
00037 {
00038 }
00039 
00040 template<class PixelC>
00041 PLFilterFill<PixelC>::~PLFilterFill()
00042 {
00043 }
00044 
00045 template<class PixelC>
00046 void PLFilterFill<PixelC>::ApplyInPlace(PLBmp * pBmp) const
00047 {
00048   pBmp->ApplyFilter (PLFilterFillRect<PixelC> (PLPoint(0,0),
00049             PLPoint (pBmp->GetWidth(), pBmp->GetHeight()),
00050                      m_Color));
00051 }
00052 
00053 #endif
00054 
00055 /*
00056 /--------------------------------------------------------------------
00057 |
00058 |      $Log: plfilterfill.h,v $
00059 |      Revision 1.6  2004/04/16 20:14:42  uzadow
00060 |      Changes to make cdoc work.
00061 |
00062 |      Revision 1.5  2004/02/15 22:43:32  uzadow
00063 |      Added 8-bit-support to DFBBitmap and PLFilterFill
00064 |
00065 |      Revision 1.4  2002/02/24 13:00:46  uzadow
00066 |      Documentation update; removed buggy PLFilterRotate.
00067 |
00068 |      Revision 1.3  2002/02/11 16:45:37  uzadow
00069 |      Fixed bug decoding 16 bit per channel tiffs.
00070 |
00071 |      Revision 1.2  2001/09/28 19:50:56  uzadow
00072 |      Added some 24 bpp stuff & other minor features.
00073 |
00074 |      Revision 1.1  2001/09/16 19:03:23  uzadow
00075 |      Added global name prefix PL, changed most filenames.
00076 |
00077 |      Revision 1.1  2001/09/13 20:48:42  uzadow
00078 |      Added fill filters.
00079 |
00080 |      Revision 1.2  2001/09/13 10:39:31  uzadow
00081 |      Added FilterFillRect
00082 |
00083 |      Revision 1.1  2001/09/06 14:20:13  uzadow
00084 |      Moved FilterFill to paintlib
00085 |
00086 |      Revision 1.1.2.1  2001/09/04 11:20:40  uzadow
00087 |      Initial version: test works, no main program yet.
00088 |
00089 |
00090 \--------------------------------------------------------------------
00091 */

Generated on Sun Jun 6 13:42:22 2004 for paintlib by doxygen 1.3.2