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 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140
|
<!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: plddrawbmp.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>plddrawbmp.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: plddrawbmp_8h-source.html,v 1.1 2004/07/28 15:15:28 uzadow Exp $</span>
00005 <span class="comment">| Bitmap class using a directdraw surface.</span>
00006 <span class="comment">|</span>
00007 <span class="comment">| Copyright (c) 1996-2002 Ulrich von Zadow</span>
00008 <span class="comment">|</span>
00009 <span class="comment">\--------------------------------------------------------------------</span>
00010 <span class="comment">*/</span>
00011
00012 <span class="preprocessor">#ifndef INCL_DDRAWBMP</span>
00013 <span class="preprocessor"></span><span class="preprocessor">#define INCL_DDRAWBMP</span>
00014 <span class="preprocessor"></span>
00015 <span class="preprocessor">#include "plbitmap.h"</span>
00016
00017 <span class="preprocessor">#include <ddraw.h></span>
00018 <span class="comment"></span>
00019 <span class="comment">//! </span>
00020 <span class="comment"></span><span class="keyword">class </span>PLDDrawBmp : <span class="keyword">public</span> <a class="code" href="classPLBmp.html">PLBmp</a>
00021 {
00022
00023 <span class="keyword">public</span>:<span class="comment"></span>
00024 <span class="comment"> //! Creates an empty bitmap.</span>
00025 <span class="comment"></span> PLDDrawBmp
00026 ( IDirectDraw * pDDraw
00027 );
00028 <span class="comment"></span>
00029 <span class="comment"> //! Destroys the bitmap.</span>
00030 <span class="comment"></span> <span class="keyword">virtual</span> ~PLDDrawBmp
00031 ();
00032
00033 <span class="preprocessor">#ifdef _DEBUG</span>
00034 <span class="preprocessor"></span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> AssertValid
00035 () <span class="keyword">const</span>; <span class="comment">// Tests internal object state</span>
00036 <span class="preprocessor">#endif</span>
00037 <span class="preprocessor"></span>
00038 <span class="comment">// PLDDrawBmp information</span>
00039 <span class="comment"></span>
00040 <span class="comment"> //! Returns the amount of memory used by the object.</span>
00041 <span class="comment"></span> <span class="keyword">virtual</span> <span class="keywordtype">long</span> GetMemUsed
00042 ();
00043 <span class="comment"></span>
00044 <span class="comment"> //! Returns number of bytes used per line.</span>
00045 <span class="comment"></span> <span class="keywordtype">long</span> GetBytesPerLine
00046 ();
00047 <span class="comment"></span>
00048 <span class="comment"> //! Returns the size of the bitmap in pixels</span>
00049 <span class="comment"></span> SIZE GetSize
00050 ();
00051 <span class="comment"></span>
00052 <span class="comment"> //! Draws the bitmap.</span>
00053 <span class="comment"></span><span class="comment">// virtual void Blt</span>
00054 <span class="comment">// ();</span>
00055 <span class="comment"></span>
00056 <span class="comment"> //! Locks the DirectDraw surface and fills the line array. GetLineArray() </span>
00057 <span class="comment"> //! returns NULL if the surface isn't locked.</span>
00058 <span class="comment"></span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> Lock
00059 ( <span class="keywordtype">bool</span> bReadable,
00060 <span class="keywordtype">bool</span> bWriteable
00061 );
00062 <span class="comment"></span>
00063 <span class="comment"> //! Unlocks the DirectDraw surface.</span>
00064 <span class="comment"></span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> Unlock
00065 ();
00066 <span class="comment"></span>
00067 <span class="comment"> //! Gets a pointer to the directdraw surface used.</span>
00068 <span class="comment"></span> IDirectDrawSurface * GetSurface
00069 ();
00070
00071 <span class="keyword">protected</span>:
00072
00073 <span class="comment">// Protected callbacks</span>
00074 <span class="comment"></span>
00075 <span class="comment"> //! Create a new empty DIB. Bits are uninitialized.</span>
00076 <span class="comment"> //! Assumes that no memory is allocated before the call.</span>
00077 <span class="comment"></span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPLBmp.html#b0">internalCreate</a>
00078 ( LONG Width,
00079 LONG Height,
00080 WORD BitsPerPixel,
00081 <span class="keywordtype">bool</span> bAlphaChannel,
00082 <span class="keywordtype">bool</span> bIsGreyscale
00083 );
00084 <span class="comment"></span>
00085 <span class="comment"> //! Deletes memory allocated by member variables.</span>
00086 <span class="comment"></span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> freeMembers
00087 ();
00088 <span class="comment"></span>
00089 <span class="comment"> //! Initializes internal table of line addresses.</span>
00090 <span class="comment"></span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> initLineArray
00091 ();
00092
00093 <span class="comment">// Set color table pointer & pointer to bits</span>
00094 <span class="keyword">virtual</span> <span class="keywordtype">void</span> initPointers
00095 ();
00096
00097 <span class="keyword">private</span>:
00098
00099 <span class="comment">// Member variables.</span>
00100 IDirectDrawSurface * m_pSurface;
00101 DDSURFACEDESC * m_pDDSurfaceDesc;
00102 IDirectDraw * m_pDDraw;
00103 };
00104
00105 <span class="preprocessor">#endif</span>
00106 <span class="preprocessor"></span><span class="comment">/*</span>
00107 <span class="comment">/--------------------------------------------------------------------</span>
00108 <span class="comment">|</span>
00109 <span class="comment">| $Log: plddrawbmp_8h-source.html,v $
00109 <span class="comment">| Revision 1.1 2004/07/28 15:15:28 uzadow
00109 <span class="comment">| Added missing documentation files.
00109 <span class="comment">|</span>
00110 <span class="comment">| Revision 1.3 2002/08/04 20:08:01 uzadow</span>
00111 <span class="comment">| Added PLBmpInfo class, ability to extract metainformation from images without loading the whole image and proper greyscale support.</span>
00112 <span class="comment">|</span>
00113 <span class="comment">| Revision 1.2 2002/03/31 13:36:42 uzadow</span>
00114 <span class="comment">| Updated copyright.</span>
00115 <span class="comment">|</span>
00116 <span class="comment">| Revision 1.1 2001/09/16 19:03:23 uzadow</span>
00117 <span class="comment">| Added global name prefix PL, changed most filenames.</span>
00118 <span class="comment">|</span>
00119 <span class="comment">| Revision 1.1 2000/08/13 12:11:43 Administrator</span>
00120 <span class="comment">| Added experimental DirectDraw-Support</span>
00121 <span class="comment">|</span>
00122 <span class="comment">|</span>
00123 <span class="comment">\--------------------------------------------------------------------</span>
00124 <span class="comment">*/</span>
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sun Jun 6 13:42:22 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>
|