blob: ab1c2dba28de5c8c33a6c75bc3cc62ed8c85dd9b (
plain)
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
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>imgsynth2: imgsynth2/cpixelformat_indexed8.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.3 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<h1>imgsynth2/cpixelformat_indexed8.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001
<a name="l00008"></a>00008 <span class="preprocessor">#ifndef CPixelFormat_Indexed8_H</span>
<a name="l00009"></a>00009 <span class="preprocessor"></span><span class="preprocessor">#define CPixelFormat_Indexed8_H</span>
<a name="l00010"></a>00010 <span class="preprocessor"></span>
<a name="l00011"></a>00011 <span class="preprocessor">#include <fstream></span>
<a name="l00012"></a>00012 <span class="preprocessor">#include "cpixelformat.h"</span>
<a name="l00013"></a>00013
<a name="l00020"></a><a class="code" href="classCPixelFormat__Indexed8.html">00020</a> <span class="keyword">class </span><a class="code" href="classCPixelFormat__Indexed8.html" title="Implementation of CPixelFormat handling 24bit indexed bitmaps.">CPixelFormat_Indexed8</a> : <span class="keyword">public</span> <a class="code" href="classCPixelFormat.html" title="Abstract class for handling different color bitcount of Bitmaps.">CPixelFormat</a>
<a name="l00021"></a>00021 {
<a name="l00022"></a>00022 <span class="keyword">public</span>:
<a name="l00032"></a><a class="code" href="classCPixelFormat__Indexed8.html#bbc3a8d9c76664f87d2eda110880bfb5">00032</a> <a class="code" href="classCPixelFormat__Indexed8.html#bbc3a8d9c76664f87d2eda110880bfb5" title="Default ctor.">CPixelFormat_Indexed8</a>(<a class="code" href="classCBitmap.html" title="Abstract implementation of CFile handling Bitmaps.">CBitmap</a> *bitmap)
<a name="l00033"></a>00033 : <a class="code" href="classCPixelFormat.html" title="Abstract class for handling different color bitcount of Bitmaps.">CPixelFormat</a>(bitmap)
<a name="l00034"></a>00034 {}
<a name="l00035"></a>00035
<a name="l00045"></a><a class="code" href="classCPixelFormat__Indexed8.html#781e9e7d62c23dd491b8288b1a26b393">00045</a> <a class="code" href="classCPixelFormat__Indexed8.html#781e9e7d62c23dd491b8288b1a26b393" title="Default dtor.">~CPixelFormat_Indexed8</a>()
<a name="l00046"></a>00046 {}
<a name="l00047"></a>00047
<a name="l00059"></a>00059 <span class="keywordtype">void</span> <a class="code" href="classCPixelFormat__Indexed8.html#d77b6e03ca34e354e1abf81ae8646eea" title="Get pixel at coordinates x, y.">getPixel</a>(RGBPIXEL& pixel, uint32_t x, uint32_t y);
<a name="l00060"></a>00060
<a name="l00072"></a>00072 <span class="keywordtype">void</span> <a class="code" href="classCPixelFormat__Indexed8.html#6b2792a98b8f06f0ed014054b9218fdf" title="Modifies pixel at coordinates x, y.">setPixel</a>(<span class="keyword">const</span> RGBPIXEL& pixel, uint32_t x, uint32_t y);
<a name="l00073"></a>00073
<a name="l00083"></a><a class="code" href="classCPixelFormat__Indexed8.html#677d751409dc57344b0ca5f6787ead0c">00083</a> uint32_t <a class="code" href="classCPixelFormat__Indexed8.html#677d751409dc57344b0ca5f6787ead0c" title="returns the bitcount needed for indexing the color tabel.">getBitCount</a>()
<a name="l00084"></a>00084 {
<a name="l00085"></a>00085 <span class="keywordflow">return</span> 24;
<a name="l00086"></a>00086 }
<a name="l00087"></a>00087
<a name="l00097"></a><a class="code" href="classCPixelFormat__Indexed8.html#d56bbec5d00cbd3c60f21fecc6ebc1a4">00097</a> <span class="keywordtype">void</span> <a class="code" href="classCPixelFormat__Indexed8.html#d56bbec5d00cbd3c60f21fecc6ebc1a4" title="Get maximum values for RGB pixel.">getMaxColor</a>(RGBPIXEL& pixel)
<a name="l00098"></a>00098 {
<a name="l00099"></a>00099 <span class="comment">/* value = 2^8 - 1 */</span>
<a name="l00100"></a>00100 pixel.red = pixel.green = pixel.blue = 255;
<a name="l00101"></a>00101 }
<a name="l00102"></a>00102 };
<a name="l00103"></a>00103
<a name="l00104"></a>00104 <span class="preprocessor">#endif</span>
<a name="l00105"></a>00105 <span class="preprocessor"></span>
<a name="l00106"></a>00106 <span class="comment">/* vim: set et sw=2 ts=2: */</span>
</pre></div><hr size="1"><address style="text-align: right;"><small>Generated on Sat May 2 18:58:11 2009 for imgsynth2 by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address>
</body>
</html>
|