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

plfilterfill.h

00001 /*
00002 /--------------------------------------------------------------------
00003 |
00004 |      $Id: plfilterfill_8h-source.html,v 1.4 2004/09/15 15:26:29 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 "plinplacefilter.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 PLInPlaceFilter
00024 {
00025 public:
00026   PLFilterFill (const PixelC& Color);
00027   virtual ~PLFilterFill();
00028   virtual void ApplyInPlace(PLBmpBase *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(PLBmpBase * pBmp) const
00047 {
00048   PLFilterFillRect<PixelC> RectFilter(PLPoint(0,0),
00049         PLPoint (pBmp->GetWidth(), pBmp->GetHeight()), m_Color);
00050   RectFilter.ApplyInPlace(pBmp);
00051 }
00052 
00053 #endif
00054 
00055 /*
00056 /--------------------------------------------------------------------
00057 |
00058 |      $Log: plfilterfill_8h-source.html,v $
00058 |      Revision 1.4  2004/09/15 15:26:29  uzadow
00058 |      Linux compatibility changes, doc update.
00058 |
00059 |      Revision 1.8  2004/06/20 16:59:38  uzadow
00060 |      Added PLBmpBase::CopyPixels() and PLInPlaceFilter
00061 |
00062 |      Revision 1.7  2004/06/06 12:56:38  uzadow
00063 |      Doxygenified documentation.
00064 |
00065 |      Revision 1.6  2004/04/16 20:14:42  uzadow
00066 |      Changes to make cdoc work.
00067 |
00068 |      Revision 1.5  2004/02/15 22:43:32  uzadow
00069 |      Added 8-bit-support to DFBBitmap and PLFilterFill
00070 |
00071 |      Revision 1.4  2002/02/24 13:00:46  uzadow
00072 |      Documentation update; removed buggy PLFilterRotate.
00073 |
00074 |      Revision 1.3  2002/02/11 16:45:37  uzadow
00075 |      Fixed bug decoding 16 bit per channel tiffs.
00076 |
00077 |      Revision 1.2  2001/09/28 19:50:56  uzadow
00078 |      Added some 24 bpp stuff & other minor features.
00079 |
00080 |      Revision 1.1  2001/09/16 19:03:23  uzadow
00081 |      Added global name prefix PL, changed most filenames.
00082 |
00083 |      Revision 1.1  2001/09/13 20:48:42  uzadow
00084 |      Added fill filters.
00085 |
00086 |      Revision 1.2  2001/09/13 10:39:31  uzadow
00087 |      Added FilterFillRect
00088 |
00089 |      Revision 1.1  2001/09/06 14:20:13  uzadow
00090 |      Moved FilterFill to paintlib
00091 |
00092 |      Revision 1.1.2.1  2001/09/04 11:20:40  uzadow
00093 |      Initial version: test works, no main program yet.
00094 |
00095 |
00096 \--------------------------------------------------------------------
00097 */

Generated on Mon Sep 13 16:16:40 2004 for paintlib by doxygen 1.3.2