1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>paintlib: plfilterfillrect.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.2 -->
<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Compound List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Compound Members</a></div>
<h1>plfilterfillrect.h</h1><div class="fragment"><pre>00001 <span class="comment">/*</span>
00002 <span class="comment">/--------------------------------------------------------------------</span>
00003 <span class="comment">|</span>
00004 <span class="comment">| $Id: plfilterfillrect_8h-source.html,v 1.4 2004/09/15 15:26:29 uzadow Exp $</span>
00005 <span class="comment">|</span>
00006 <span class="comment">\--------------------------------------------------------------------</span>
00007 <span class="comment">*/</span>
00008
00009 <span class="preprocessor">#if !defined(INCL_PLFILTERFILLRECT)</span>
00010 <span class="preprocessor"></span><span class="preprocessor">#define INCL_PLFILTERFILLRECT</span>
00011 <span class="preprocessor"></span>
00012 <span class="preprocessor">#if _MSC_VER > 1000</span>
00013 <span class="preprocessor"></span><span class="preprocessor">#pragma once</span>
00014 <span class="preprocessor"></span><span class="preprocessor">#endif // _MSC_VER > 1000</span>
00015 <span class="preprocessor"></span>
00016 <span class="preprocessor">#include "plinplacefilter.h"</span>
00017 <span class="preprocessor">#include "../plpoint.h"</span>
00018
00019 <span class="keyword">class </span><a class="code" href="classPLBmp.html">PLBmp</a>;
00020 <span class="comment"></span>
00021 <span class="comment">//! Filter that fills a rectangle in a Bitmap with a color. Works</span>
00022 <span class="comment">//! for 8, 24 and 32 bpp.</span>
<a name="l00023"></a><a class="code" href="classPLFilterFillRect.html">00023</a> <span class="comment"></span><span class="keyword">template</span><<span class="keyword">class</span> PixelC> <span class="keyword">class </span><a class="code" href="classPLFilterFillRect.html">PLFilterFillRect</a>: <span class="keyword">public</span> <a class="code" href="classPLInPlaceFilter.html">PLInPlaceFilter</a>
00024 {
00025 <span class="keyword">public</span>:
00026 <a class="code" href="classPLFilterFillRect.html">PLFilterFillRect</a> (<a class="code" href="classPLPoint.html">PLPoint</a> min, <a class="code" href="classPLPoint.html">PLPoint</a> max, <span class="keyword">const</span> PixelC& Color);
00027 <span class="keyword">virtual</span> ~<a class="code" href="classPLFilterFillRect.html">PLFilterFillRect</a>();
00028 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPLFilterFillRect.html#a2">ApplyInPlace</a>(<a class="code" href="classPLBmpBase.html">PLBmpBase</a> *pBmp) <span class="keyword">const</span>;
00029
00030 <span class="keyword">private</span>:
00031 PixelC m_Color;
00032 <a class="code" href="classPLPoint.html">PLPoint</a> m_min;
00033 <a class="code" href="classPLPoint.html">PLPoint</a> m_max;
00034 };
00035
00036 <span class="keyword">template</span><<span class="keyword">class</span> PixelC>
00037 <a class="code" href="classPLFilterFillRect.html">PLFilterFillRect<PixelC></a>::PLFilterFillRect
00038 (<a class="code" href="classPLPoint.html">PLPoint</a> min, <a class="code" href="classPLPoint.html">PLPoint</a> max, <span class="keyword">const</span> PixelC& Color)
00039 {
00040 m_min = min;
00041 m_max = max;
00042 m_Color = Color;
00043 }
00044
00045 <span class="keyword">template</span><<span class="keyword">class</span> PixelC>
00046 <a class="code" href="classPLFilterFillRect.html">PLFilterFillRect<PixelC>::~PLFilterFillRect</a> ()
00047 {
00048
00049 }
00050
00051 <span class="keyword">template</span><<span class="keyword">class</span> PixelC>
<a name="l00052"></a><a class="code" href="classPLFilterFillRect.html#a2">00052</a> <span class="keywordtype">void</span> <a class="code" href="classPLFilterFillRect.html#a2">PLFilterFillRect<PixelC>::ApplyInPlace</a> (<a class="code" href="classPLBmpBase.html">PLBmpBase</a> *pBmp)<span class="keyword"> const</span>
00053 <span class="keyword"></span>{
00054 PixelC** ppLines = (PixelC**)(pBmp-><a class="code" href="classPLBmpBase.html#a15">GetLineArray</a>());
00055 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> y=m_min.<a class="code" href="classPLPoint.html#o1">y</a>; y<m_max.<a class="code" href="classPLPoint.html#o1">y</a>; ++y)
00056 {
00057 PixelC* pLine = ppLines[y];
00058 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> x=m_min.<a class="code" href="classPLPoint.html#o0">x</a>; x<m_max.<a class="code" href="classPLPoint.html#o0">x</a>; ++x)
00059 pLine[x] = m_Color;
00060 }
00061 }
00062
00063 <span class="preprocessor">#endif</span>
00064 <span class="preprocessor"></span>
00065 <span class="comment">/*</span>
00066 <span class="comment">/--------------------------------------------------------------------</span>
00067 <span class="comment">|</span>
00068 <span class="comment">| $Log: plfilterfillrect_8h-source.html,v $
00068 <span class="comment">| Revision 1.4 2004/09/15 15:26:29 uzadow
00068 <span class="comment">| Linux compatibility changes, doc update.
00068 <span class="comment">|</span>
00069 <span class="comment">| Revision 1.6 2004/06/20 16:59:38 uzadow</span>
00070 <span class="comment">| Added PLBmpBase::CopyPixels() and PLInPlaceFilter</span>
00071 <span class="comment">|</span>
00072 <span class="comment">| Revision 1.5 2004/06/06 12:56:38 uzadow</span>
00073 <span class="comment">| Doxygenified documentation.</span>
00074 <span class="comment">|</span>
00075 <span class="comment">| Revision 1.4 2002/02/10 22:53:26 uzadow</span>
00076 <span class="comment">| Fixed cdoc problems.</span>
00077 <span class="comment">|</span>
00078 <span class="comment">| Revision 1.3 2001/10/21 17:12:40 uzadow</span>
00079 <span class="comment">| Added PSD decoder beta, removed BPPWanted from all decoders, added PLFilterPixel.</span>
00080 <span class="comment">|</span>
00081 <span class="comment">| Revision 1.2 2001/09/28 19:50:56 uzadow</span>
00082 <span class="comment">| Added some 24 bpp stuff & other minor features.</span>
00083 <span class="comment">|</span>
00084 <span class="comment">| Revision 1.1 2001/09/16 19:03:23 uzadow</span>
00085 <span class="comment">| Added global name prefix PL, changed most filenames.</span>
00086 <span class="comment">|</span>
00087 <span class="comment">| Revision 1.1 2001/09/13 20:48:42 uzadow</span>
00088 <span class="comment">| Added fill filters.</span>
00089 <span class="comment">|</span>
00090 <span class="comment">| Revision 1.1 2001/09/13 10:39:31 uzadow</span>
00091 <span class="comment">| Added FilterFillRect</span>
00092 <span class="comment">|</span>
00093 <span class="comment">|</span>
00094 <span class="comment">\--------------------------------------------------------------------</span>
00095 <span class="comment">*/</span>
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Sep 13 16:16:40 2004 for paintlib by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 >
</a>1.3.2 </small></address>
</body>
</html>
|