00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef INCL_PLDIRECTFBBMP
00012 #define INCL_PLDIRECTFBBMP
00013
00014 #ifndef INCL_PLBITMAP
00015 #include "plbitmap.h"
00016 #endif
00017
00018 #include <directfb.h>
00019
00020
00021
00022
00023 class PLDirectFBBmp : public PLBmp
00024 {
00025
00026 public:
00027
00028
00029 static void SetDirectFB
00030 ( IDirectFB * pDirectFB
00031 );
00032
00033
00034
00035
00036 PLDirectFBBmp
00037 ();
00038
00039
00040 virtual ~PLDirectFBBmp
00041 ();
00042
00043
00044 PLDirectFBBmp
00045 ( const PLBmp &Orig
00046 );
00047
00048
00049 PLDirectFBBmp
00050 ( const PLDirectFBBmp &Orig
00051 );
00052
00053 #ifdef _DEBUG
00054 virtual void AssertValid
00055 () const;
00056 #endif
00057
00058
00059 PLDirectFBBmp &operator=
00060 ( const PLBmp &Orig
00061 );
00062
00063
00064 PLDirectFBBmp &operator=
00065 ( const PLDirectFBBmp &Orig
00066 );
00067
00068
00069
00070
00071
00072
00073
00074 IDirectFBSurface * GetSurface
00075 ();
00076
00077
00078 long GetMemUsed
00079 ();
00080
00081
00082 long GetBytesPerLine
00083 ();
00084
00085
00086
00087
00088 static long GetMemNeeded
00089 ( PLLONG width,
00090 PLLONG height,
00091 PLWORD BitsPerPixel
00092 );
00093
00094
00095 static long GetBitsMemNeeded
00096 ( PLLONG width,
00097 PLLONG height,
00098 PLWORD BitsPerPixel
00099 );
00100
00101
00102 protected:
00103
00104
00105
00106
00107 virtual void internalCreate
00108 ( PLLONG Width,
00109 PLLONG Height,
00110 PLWORD BitsPerPixel,
00111 bool bAlphaChannel,
00112 bool bIsGreyscale
00113 );
00114
00115
00116 virtual void freeMembers
00117 ();
00118
00119
00120 virtual void initLineArray
00121 ();
00122
00123 private:
00124 static IDirectFB * s_pDirectFB;
00125 IDirectFBSurface * m_pSurface;
00126 DFBSurfaceDescription m_Desc;
00127 };
00128
00129
00130
00131
00132 inline PLDirectFBBmp::PLDirectFBBmp
00133 ( const PLDirectFBBmp &Orig
00134 )
00135 : PLBmp ()
00136 {
00137 internalCopy (Orig);
00138 }
00139
00140 inline PLDirectFBBmp::PLDirectFBBmp
00141 ( const PLBmp &Orig
00142 )
00143 : PLBmp ()
00144 {
00145 internalCopy (Orig);
00146 }
00147
00148 inline PLDirectFBBmp & PLDirectFBBmp::operator=
00149 ( const PLBmp &Orig
00150 )
00151 {
00152 PLBmp::operator=(Orig);
00153 return *this;
00154 }
00155
00156 inline PLDirectFBBmp & PLDirectFBBmp::operator=
00157 ( const PLDirectFBBmp &Orig
00158 )
00159 {
00160 PLBmp::operator=(Orig);
00161 return *this;
00162 }
00163
00164
00165 #endif
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175
00176
00177
00178
00179