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 virtual void CreateFromSurface
00054 ( IDirectFBSurface * pSurface,
00055 bool bOwnsSurface
00056 );
00057
00058 #ifdef _DEBUG
00059 virtual void AssertValid
00060 () const;
00061 #endif
00062
00063
00064 PLDirectFBBmp &operator=
00065 ( const PLBmp &Orig
00066 );
00067
00068
00069 PLDirectFBBmp &operator=
00070 ( const PLDirectFBBmp &Orig
00071 );
00072
00073
00074
00075
00076
00077
00078
00079 IDirectFBSurface * GetSurface
00080 ();
00081
00082
00083 long GetMemUsed
00084 ();
00085
00086
00087 long GetBytesPerLine
00088 ();
00089
00090
00091
00092
00093 static long GetMemNeeded
00094 ( PLLONG width,
00095 PLLONG height,
00096 PLWORD BitsPerPixel
00097 );
00098
00099
00100 static long GetBitsMemNeeded
00101 ( PLLONG width,
00102 PLLONG height,
00103 PLWORD BitsPerPixel
00104 );
00105
00106
00107 protected:
00108
00109
00110
00111
00112 virtual void internalCreate
00113 ( PLLONG Width,
00114 PLLONG Height,
00115 PLWORD BitsPerPixel,
00116 bool bAlphaChannel,
00117 bool bIsGreyscale
00118 );
00119
00120
00121 virtual void freeMembers
00122 ();
00123
00124
00125 virtual void initLineArray
00126 ();
00127
00128 private:
00129 static IDirectFB * s_pDirectFB;
00130 IDirectFBSurface * m_pSurface;
00131 bool m_bOwnsSurface;
00132 };
00133
00134
00135
00136
00137 inline PLDirectFBBmp::PLDirectFBBmp
00138 ( const PLDirectFBBmp &Orig
00139 )
00140 : PLBmp ()
00141 {
00142 internalCopy (Orig);
00143 }
00144
00145 inline PLDirectFBBmp::PLDirectFBBmp
00146 ( const PLBmp &Orig
00147 )
00148 : PLBmp ()
00149 {
00150 internalCopy (Orig);
00151 }
00152
00153 inline PLDirectFBBmp & PLDirectFBBmp::operator=
00154 ( const PLBmp &Orig
00155 )
00156 {
00157 PLBmp::operator=(Orig);
00158 return *this;
00159 }
00160
00161 inline PLDirectFBBmp & PLDirectFBBmp::operator=
00162 ( const PLDirectFBBmp &Orig
00163 )
00164 {
00165 PLBmp::operator=(Orig);
00166 return *this;
00167 }
00168
00169
00170 #endif
00171
00172
00173
00174