blob: 137330cdc4498723ffd10f60143b4dba3d63fcf6 (
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
57
58
59
60
61
62
63
64
65
66
67
68
69
|
<!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.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.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001
<a name="l00009"></a>00009 <span class="preprocessor">#ifndef CPIXELFORMAT_H</span>
<a name="l00010"></a>00010 <span class="preprocessor"></span><span class="preprocessor">#define CPIXELFORMAT_H</span>
<a name="l00011"></a>00011 <span class="preprocessor"></span>
<a name="l00012"></a>00012 <span class="preprocessor">#include <fstream></span>
<a name="l00013"></a>00013 <span class="preprocessor">#include <stdexcept></span>
<a name="l00014"></a>00014
<a name="l00015"></a>00015 <span class="keyword">class </span><a class="code" href="classCBitmap.html" title="Abstract implementation of CFile handling Bitmaps.">CBitmap</a>;
<a name="l00016"></a>00016
<a name="l00025"></a><a class="code" href="classCPixelFormat.html">00025</a> <span class="keyword">class </span><a class="code" href="classCPixelFormat.html" title="Abstract class for handling different color bitcount of Bitmaps.">CPixelFormat</a>
<a name="l00026"></a>00026 {
<a name="l00027"></a>00027 <span class="keyword">public</span>:
<a name="l00032"></a><a class="code" href="classCPixelFormat_1_1PixelFormatError.html">00032</a> <span class="keyword">class </span><a class="code" href="classCPixelFormat_1_1PixelFormatError.html" title="Exception thrown by implemententations of CPixelFormat.">PixelFormatError</a> : <span class="keyword">public</span> std::invalid_argument {
<a name="l00033"></a>00033 <span class="keyword">public</span>:
<a name="l00043"></a><a class="code" href="classCPixelFormat_1_1PixelFormatError.html#f227e9261537b316f57ff8c099948df4">00043</a> <a class="code" href="classCPixelFormat_1_1PixelFormatError.html#f227e9261537b316f57ff8c099948df4" title="Default exception ctor.">PixelFormatError</a>(<span class="keyword">const</span> std::string& what)
<a name="l00044"></a>00044 : std::invalid_argument(what)
<a name="l00045"></a>00045 {}
<a name="l00046"></a>00046 };
<a name="l00047"></a>00047
<a name="l00057"></a><a class="code" href="classCPixelFormat.html#6216335559cf002f1e870b420b15913e">00057</a> <a class="code" href="classCPixelFormat.html#6216335559cf002f1e870b420b15913e" title="Default ctor.">CPixelFormat</a>(<a class="code" href="classCBitmap.html" title="Abstract implementation of CFile handling Bitmaps.">CBitmap</a> *bitmap)
<a name="l00058"></a>00058 : <a class="code" href="classCPixelFormat.html#0c0ab3e11535c9cda07d049cc6bd6f9a">m_bitmap</a>(bitmap)
<a name="l00059"></a>00059 {}
<a name="l00060"></a>00060
<a name="l00070"></a><a class="code" href="classCPixelFormat.html#363edc98e8a6460466d52590679f1853">00070</a> <span class="keyword">virtual</span> <a class="code" href="classCPixelFormat.html#363edc98e8a6460466d52590679f1853" title="Default dtor (virtual).">~CPixelFormat</a>()
<a name="l00071"></a>00071 {};
<a name="l00072"></a>00072
<a name="l00076"></a><a class="code" href="structCPixelFormat_1_1RGBPIXEL.html">00076</a> <span class="keyword">typedef</span> <span class="keyword">struct</span>
<a name="l00077"></a>00077 {
<a name="l00079"></a><a class="code" href="structCPixelFormat_1_1RGBPIXEL.html#8411664fe48f3d0b77b989d9cbe8d87a">00079</a> uint32_t red;
<a name="l00081"></a><a class="code" href="structCPixelFormat_1_1RGBPIXEL.html#0e8885cc87b60900a15701289f18a332">00081</a> uint32_t green;
<a name="l00083"></a><a class="code" href="structCPixelFormat_1_1RGBPIXEL.html#c68895d7c90815fd505b6623649754e1">00083</a> uint32_t blue;
<a name="l00084"></a>00084 } <a class="code" href="structCPixelFormat_1_1RGBPIXEL.html" title="RGB Pixel structure.">RGBPIXEL</a>;
<a name="l00085"></a>00085
<a name="l00097"></a>00097 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classCPixelFormat.html#5305559ecc7bd185d149493947ac45e7" title="Get pixel at coordinates x, y.">getPixel</a>(<a class="code" href="structCPixelFormat_1_1RGBPIXEL.html" title="RGB Pixel structure.">RGBPIXEL</a>& pixel, <span class="keyword">const</span> uint32_t x, <span class="keyword">const</span> uint32_t y) = 0;
<a name="l00098"></a>00098
<a name="l00110"></a>00110 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classCPixelFormat.html#6e6b0e48e8d6cd5e5b0fb7399307aa48" title="Modifies pixel at coordinates x, y.">setPixel</a>(<span class="keyword">const</span> <a class="code" href="structCPixelFormat_1_1RGBPIXEL.html" title="RGB Pixel structure.">RGBPIXEL</a>& pixel, <span class="keyword">const</span> uint32_t x, <span class="keyword">const</span> uint32_t y) = 0;
<a name="l00111"></a>00111
<a name="l00121"></a>00121 <span class="keyword">virtual</span> uint32_t <a class="code" href="classCPixelFormat.html#bfe1496b57a8a62be38de66ae6cfe3a7" title="returns color bitcount supported by this class">getBitCount</a>() = 0;
<a name="l00122"></a>00122
<a name="l00132"></a>00132 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classCPixelFormat.html#bacedecc124fa734273948989cb4e31e" title="Get maximum values for RGB pixel.">getMaxColor</a>(<a class="code" href="structCPixelFormat_1_1RGBPIXEL.html" title="RGB Pixel structure.">RGBPIXEL</a>& pixel) = 0;
<a name="l00133"></a>00133
<a name="l00134"></a>00134 <span class="keyword">protected</span>:
<a name="l00135"></a>00135 <span class="comment">/* members */</span>
<a name="l00137"></a><a class="code" href="classCPixelFormat.html#0c0ab3e11535c9cda07d049cc6bd6f9a">00137</a> <a class="code" href="classCBitmap.html" title="Abstract implementation of CFile handling Bitmaps.">CBitmap</a> *<a class="code" href="classCPixelFormat.html#0c0ab3e11535c9cda07d049cc6bd6f9a">m_bitmap</a>;
<a name="l00138"></a>00138 };
<a name="l00139"></a>00139
<a name="l00140"></a>00140 <span class="preprocessor">#endif</span>
<a name="l00141"></a>00141 <span class="preprocessor"></span>
<a name="l00142"></a>00142 <span class="comment">/* vim: set et sw=2 ts=2: */</span>
</pre></div><hr size="1"><address style="text-align: right;"><small>Generated on Sun May 3 19:16:26 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>
|