Platform_Win32_Screen_GDI.h
Go to the documentation of this file.00001 00010 #ifndef __Platform_Win32_Screen_GDI_H__ 00011 #define __Platform_Win32_Screen_GDI_H__ 00012 00013 // Includes 00014 #include "Platform_Win32_Screen_Technology.h" 00015 00016 // Forward declares 00017 struct HDC__; 00018 00019 // Platform_Win32_Screen_GDI 00020 class Platform_Win32_Screen_GDI:public Platform_Win32_Screen_Technology 00021 { 00022 00023 public: 00024 Platform_Win32_Screen_GDI(struct HWND__* windowHandle, bool fullscreen, int screenWidth, int screenHeight); 00025 virtual ~Platform_Win32_Screen_GDI(); 00026 00027 virtual bool Setup(); 00028 00029 virtual bool Present( 00030 unsigned short* bitmapData, 00031 int bitmapWidth, 00032 int bitmapHeight, 00033 unsigned short modulate, 00034 unsigned short backgroundColor 00035 ); 00036 00037 virtual void SetInterpolationMode(bool enabled); 00038 00039 virtual void TransformCursorCoordinates(float& x, float& y); 00040 private: 00041 bool CopyBitmapData( 00042 unsigned short* source, int sourceWidth, int sourceHeight, int sourcePitch, 00043 unsigned short* destination, int destinationWidth, int destinationHeight, int destinationPitch, 00044 unsigned short modulate 00045 ); 00046 00047 void ModulateBitmap( 00048 unsigned short* bitmapData, 00049 int bitmapWidth, 00050 int bitmapHeight, 00051 unsigned short modulate 00052 ); 00053 00054 void ScaleBitmap( 00055 unsigned short* bitmapData, 00056 int bitmapWidth, 00057 int bitmapHeight, 00058 int scale 00059 ); 00060 00061 void ModulateAndScaleBitmap 00062 ( 00063 unsigned short* bitmapData, 00064 int bitmapWidth, 00065 int bitmapHeight, 00066 unsigned short modulate, 00067 int scale); 00068 00069 void CropBitmap( 00070 unsigned short* bitmapData, 00071 int bitmapWidth, 00072 int bitmapHeight 00073 ); 00074 00075 void ModulateAndCropBitmap( 00076 unsigned short* bitmapData, 00077 int bitmapWidth, 00078 int bitmapHeight, 00079 unsigned short modulate 00080 ); 00081 00082 void SetDIBits( 00083 unsigned short* data, 00084 int width, 00085 int height, 00086 int x = 0, 00087 int y = 0 00088 ); 00089 00090 private: 00091 struct HWND__* windowHandle_; 00092 bool fullscreen_; 00093 int screenWidth_; 00094 int screenHeight_; 00095 unsigned short* backBuffer_; 00096 int lastPresentWidth_; 00097 int lastPresentHeight_; 00098 }; 00099 00100 00101 #endif /* __Platform_Win32_Screen_GDI_H__ */
Reproduction/republishing of any material on this site without permission is strictly prohibited.
